tippecanoe Mapbox GL JS

tippecanoe Mapbox GL JS

我有一些包含数百万个点的 geoJSON,我使用 tippecanoe 将其转换为 mbtiles。我将这个 mbtiles 文件上传到 mapbox,将图块添加到样式中,然后我可以使用 mapbox gl JS 查看我的数据。我如何设置点的样式,使它们显示为具有特定颜色的点。我将 marker-color 和 marker-symbol 添加到 geoJSON,然后如果我 console.log 单击了一个功能,我就可以看到这些。但是,这些都不起作用。对于形状,我只想要简单的圆圈,这是默认设置。但我需要根据 geoJSON 中设置的值自定义这些圆圈的颜色。

我最终决定使用这个磁贴服务器并自己托管磁贴:https://github.com/klokantech/tileserver-php. The example code the server gives you after loading an mbtile file should work, except that the type in the layer style json should be changed to circle instead of line if your data consists of circles, see this : https://github.com/mapbox/tippecanoe/issues/250#issuecomment-220871181