You can create an empty GeoJSON layer by passing it false
instead of real data:
this.pointsLayer = L.mapbox.featureLayer(false, {
pointToLayer: function(feature, latlon) {
return L.circleMarker(latlon, {
fillColor: '#AA5042',
fillOpacity: 0.7,
radius: 3,
stroke: false
});
}
}).addTo(map);
.addData
, , . - :
var geoJSON = { "type": "FeatureCollection", "features": [] };
geoJSON["features"] =
this.pointsLayer.addData(geoJSON);
, , Feature FeatureCollection, , .
EDIT: , .addData :
http://jsfiddle.net/nathansnider/4mwrwo0t/
, 10 000 , 15 000 , , , , .
, Leaflet 1.0 beta, , , . 15 000 Leaflet 0.7.5 1.0.0b2. ( , ), .