map.on('load', function () {
map.addSource("markers", {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [4.869929, 50.465887]
},
"properties": {
"marker-symbol": "pin-2"
"id or class?": ".."
}
}]
}
});发布于 2016-05-23 18:18:25
您在代码中编写的内容很好,您可以在properties部件中添加任何属性。
请参考我的示例:http://codepen.io/poupi/pen/qZeXdK
https://stackoverflow.com/questions/37341389
复制相似问题