Leaflet/Leaflet — pull request #1642 by gumballhead (2013-05-03 03:47:05+00:00)
Title: hasLayer and removeLayer by id.

Now that we can override Layer stamping with 786fadd I think it makes sense to access them with their id.

In my use case I'm using custom indexes (Backbone.Model.cid) to identify polygons, and this would be a convenient way to keep things in sync. For example, if a model is deleted I can remove the polygon from the map with `removeLayer(model.cid)`.

If not, I can still use `LayerGroup._layers[model.cid]`