[OpenLayers-Users] An interesting little artifact

Eric Lemoine eric.lemoine at camptocamp.com
Wed Apr 28 02:39:20 EDT 2010


On Wednesday, April 28, 2010, Jeff Dege <jeff.dege at korterra.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
> When I display an OpenLayers map, with a MousePosition
> control in an external div, when I destroy the map, the external div is not
> cleared.
>
>
>
> The div into which the map is displayed is cleared, and I
> see the background color it had before the map was opened, but the external div
> into which the MousePosition was drawing it's coordinates is left with the last
> coordinates displayed.

I guess this is expected, in this case the application is responsible
for the DOM element used for the control. So use
control.div.parentNode.removeChild(control.div) or something to remove
the element from the DOM.

Regards,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list