leaflet-backbone-features

1.0.5 • Public • Published

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]);

Package Sidebar

Install

npm i leaflet-backbone-features

Weekly Downloads

1

Version

1.0.5

License

MIT

Last publish

Collaborators

  • ablakey