leaflet-backbone-features
v1.0.5
Published
Backbone model-based Leaflet features
Downloads
7
Maintainers
Readme
Leaflet Marker, Polyline, and Polygon wrapped in a Backbone model.
Until this note disappears, consider this package incomplete and experimental.
###About###
Leaflet vector objects are great for geometries, but not so much for managing attribute data. This extends Backbone.Model to hold the geometry and attribute data.
The model's 'coordinates' attribute is an array of numbers (for Markers) or an array of arrays of numbers (for polylines and polygons).
###Use###
var Features = require('leaflet-backbone-features');
var marker = new Features.Marker();
marker.addTo(map);
marker.set('coordinates', [20.0, -5.5]);