0
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?": ".."
                }
           }]
    }
});
4

1 回答 1

0

您在代码上编写的内容很好,您可以在properties部件中添加任何属性。

请参考我的例子:http ://codepen.io/poupi/pen/qZeXdK

于 2016-05-23T10:18:24.890 回答