LuizArmesto / backbone.leaflet

A map component for Backbone.js
MIT License
54 stars 16 forks source link

Extending models or collections? #10

Open factoidforrest opened 9 years ago

factoidforrest commented 9 years ago

Your documentation doesn't show how to extend the models or collections with more methods like you normally can in backbone. Could I do (coffeescript)

LocationsCollection = Backbone.Leaflet.GeoCollection.extend({
  url:'myurl'
  method: () -> 
    do something
})
locs = new LocationsCollection
locs.fetch()

I also may be missing the documentation for adding more JSON to an existing collection.