Destroy Leaflet Map

2,696 views
Skip to first unread message

Filipe Leandro

unread,
Aug 21, 2012, 12:14:26 PM8/21/12
to leafl...@googlegroups.com
Hi there,
How can I destroy a map in a div without removing the div from the DOM?
My map div container is dynamic which means the user can change the content of the div, for instance a plot chart instead of the map.
However if I remove the map and then add it to the same div, I always get a Uncaught TypeError: Cannot read property '_leaflet' of undefined on leaflet.js 6.

Cheers,
Filipe

Filipe Leandro

unread,
Aug 21, 2012, 3:06:14 PM8/21/12
to leafl...@googlegroups.com
Just found out this issue: https://github.com/CloudMade/Leaflet/issues/352
Sorry for bothering.

jackm...@gmail.com

unread,
Apr 15, 2013, 2:25:57 PM4/15/13
to leafl...@googlegroups.com
Just an update to the now broken link above:

Reply all
Reply to author
Forward
0 new messages