2015-04-19 32 views
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); 

半徑已設置,但顏色設置爲默認值。

+0

你想改變圓形或邊框的填充嗎? –

回答

1

這是Mapbox.js 2.1.8中的一個錯誤:如果更新到2.1.9,應該解決該問題。