I recently developed an html5 mobile application. The application was a single page where navigation hash change events replaced the entire DOM. One section of the applicati
When you remove the div
, that removes the display panel and the map will disappear. To remove the map instance, just make sure that your reference to the map is set to null
and that any references to other parts of the map are set to null
. At that point, JavaScript garbage collection will take care of cleaning up, as described in: How does garbage collection work in JavaScript?.