1
我想向我的地圖框中添加一個圓形標記,但傳遞選項不會執行其應該做的操作。我正在使用以下代碼帶有選項的MapBox上的L.circleMarker不起作用
L.mapbox.featureLayer(
{ "geometry": {"type": "Point", "coordinates": [lng , lat]}, "type": "Feature", "properties": {} },
{ pointToLayer: function(feature, latlon) {
var marker = L.circleMarker(latlon, {
radius: 2,
color: "#ff0000"
});
return marker;
} }
).addTo(map);
半徑已設置,但顏色設置爲默認值。
你想改變圓形或邊框的填充嗎? –