Clustering markers on mapbox / leaflet(mapbox/传单上的聚类标记)
问题描述
我正在尝试在 mapbox 上设置集群地图,例如 http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html
I'm trying to set up a clustered map on mapbox, like http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html
但他们的示例使用纯 .js 文件作为数据http://www.mapbox.com/mapbox.js/assets/realworld.388.js
But their example uses a plain .js file as data http://www.mapbox.com/mapbox.js/assets/realworld.388.js
而我唯一能从 mapbox 得到的是 .geojsonhttp://api.tiles.mapbox.com/v3/thebteam.map-w9jzcznw/markers.geojson
And the only thing I can get from mapbox is .geojson http://api.tiles.mapbox.com/v3/thebteam.map-w9jzcznw/markers.geojson
有没有办法可以将 geojson 转换为 js(定期)?还是从 mapbox 导出一个 javascript 数组?
Is there a way I can convert the geojson to js (on a regular basis)? Or export a javascript array from mapbox?
最终将我的数据切换为 CSV 并找到了解析器.如果有人需要,这是有效的代码:
ended up switching my data to CSV and finding a parser. Here's the code that worked, if anyone needs it:
推荐答案
这篇关于mapbox/传单上的聚类标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!