angular-ui / ui-leaflet

AngularJS directive to embed an interact with maps managed by Leaflet library
http://angular-ui.github.io/ui-leaflet
Other
315 stars 137 forks source link

Don't delete all map defaults on one map destroy #322

Open mtfurlan opened 7 years ago

mtfurlan commented 7 years ago

Instead of resetting all the map defaults, only reset the defaults for the map that is being destroyed.

I had an issue where one map was deleted, and the layer control disappeared from a different map.

This also applies to the master branch.