问题标签 [tilemill]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1058 浏览

map - 使新的 Tilemill 地图匹配默认的 Mapbox 标签样式

我想在 tilemill 中制作一个与此示例中显示标签的方式相匹配的地图,直到在每个缩放级别获得标签的国家/地区,哪个国家/地区获得缩写。与完整标题相比,使用线条将标签连接到较小的国家等。

这似乎是默认的 Mapbox 标签样式(我注意到这个 Mozilla 地图的行为方式完全相同),因为那里没有自定义。但是,在创建新的 Tilemill 地图时,根本没有标签。我需要做什么才能以与 Mapbox 示例完全相同的方式添加标签(即 Mapbox 默认标签样式)?

0 投票
1 回答
95 浏览

mustache - 如何在 Tilemill 预告片中跳过空记录,以便标签不显示“0”

在 Tilemill 预告片中,我想展示 5 个字段,例如:

某些字段包含信息,而其他字段将为空白,具体取决于记录。如何使只有带有信息的字段显示在预告片中?

0 投票
1 回答
1619 浏览

leaflet - 如何将 Mapbox 底图添加到传单?

我正在使用来自 CSV 的映射点的 Leaflet 示例。但我想使用我的 mapbox 底图。

https://github.com/perrygeo/leaflet-simple-csv

我是传单的新手。非常感谢任何帮助。

0 投票
1 回答
2751 浏览

leaflet - 如何在传单中使用自定义标记?

我正在从谷歌文档上的共享 CSV 中提取标记数据。我可以在传单中将它们映射好。我想使用我自己的 PNG 标记。我还想按数据类别分配不同的标记(如果 'employees' 字段 = <10,则使用 employee10.png )

0 投票
1 回答
3456 浏览

openstreetmap - Proper way to create tile maps for Leaflet.js?

I am trying to build a custom-designed map, with correct geodata. It could even be an image created in illustrator, but it has to be exported as a set of tiles in correct map format - so that it can be read by tools like Leaflet.js

What confuses me is that none of the available map tools seem to work very well together. I did find Tilemill, which looks very promising (it has a very clean interface and works with CSS), but:

  • Openstreetmaps does not allow downloading tile images, only XML data in OSM format.
  • Tilemill does not allow importing Openstreetmaps XML data (why!).
  • Even if you manage to design a map in Tilemill, you still cannot export tile images, only a proprietary SQL database format? What's the point of that?
  • If Tilemill is useless, are there other tools that allow opening OSM XML data and applying your own design styles?

There are some sources that talk about building your own tile server:

This source suggests converting OSM to PostGIS using SQL, and then using a custom python script and a tool named Mapnik. Then it says that it's not recommended to use Mapnik for OSM....

This source sounds promising, but then it casually mentions that you have to build and run your own custom Linux distribution...

Is there a simpler way to create map tiles with correct filenames and folders for Leaflet.js?

0 投票
1 回答
953 浏览

maps - 以 MBTiles 格式导出的 Tilemill 显示无限导出时间

我正在尝试将我的地图作为 MBTile 上传,它告诉我还有数千天,尽管我的地图没有大量数据。我尝试了几种不同的导出方式,但几个小时后他们没有导出任何数据。

这是我第一次以 MBTiles 格式导出,我希望最终将我的信息上传到 MapBox。有没有我遗漏的步骤?

最好的,

0 投票
1 回答
296 浏览

geojson - Mapbox 和 GeoJSON:使一些标记不可见

我在使用 GeoJSON 时遇到问题,是否有将标记不透明度设置为零的标记属性?我目前正在使用 mapbox 来加载标记,我的标记代码如下:

有人知道mapbox是否识别geojson中的不透明度属性吗?

0 投票
1 回答
577 浏览

mapbox - 使用 Mapbox 图层从 Tilemill 导出地理参考图像

我正在尝试使用 tilemill-reference-layer 插件使用 Tilemill 中的 Mapbox 图层导出地理参考地图图像。我可以在 Tilemill 中看到我的 Mapbox 参考地图,但是当我尝试导出图像时,不包括 Mapbox 图层。

是否可以从 Mapbox/Tilemill 获得简单的地理参考图像?对于图像的角落和/或边缘,我只需要简单的纬度/经度。

Mapbox 中的卫星和地形图层非常棒……如果我能创建一个已知纬度/经度的边界框就好了!:)

0 投票
1 回答
699 浏览

javascript - 使用 MapBox.js 独立添加 TileMill 交互式图层时不起作用

我有一个学生正在使用 MapBox.js (v1.6.0) 来显示他们在 TileMill 中制作的一些图块。这些图块使用 TileMill(文档)提供的工具提示功能来添加一些交互性。我的学生还使用 MapBox Streets 图层来提供道路等的详细视图。问题是,当我在地图中同时使用这两个图层时,瓷砖的交互性不起作用。

这是不起作用的代码:

我们已经尝试了该代码的多次迭代,但我们让它工作的唯一方法是使用 L.mapbox.map(3) 方法,然后使用 L.map.addLayer() 函数的 _ insertAtTheBottom_ 参数。

我的问题是三个方面。

  1. 这两种实现有什么区别?
  2. 为什么使用 L.mapbox.tileLayer() 创建的 tileLayer 与使用 L.mapbox.map(3) 创建和自动添加的不同?
  3. 是否有计划在未来对 API 的更改中解决这种不连续性,或者是否会在 TileMill 2 中放弃对交互式瓷砖的支持?
0 投票
1 回答
1521 浏览

postgresql - 将 osm 文件导入 postgres 数据库时出错

我正在使用以下命令osm2psql将 osm 文件导入数据库:postgres

osm2pgsql -cGs -d osm -S /usr/local/share/osm2pgsql/default.style ~/Downloads/your_file.osm.pbf

当我在终端中运行它时,出现以下错误:

我已经尝试过TomH为类似问题提出的建议,并且我遵循了官方 tilemill 文档的每一步。对于 postgis 的安装选项,我已经安装了postgresapp