Re: [OpenLayers-Users] An interesting little artifact

2010-04-28 Thread Eric Lemoine
On Wednesday, April 28, 2010, Jeff Dege jeff.d...@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.lemo...@camptocamp.com
http://www.camptocamp.com
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] An interesting little artifact

2010-04-28 Thread Eric Lemoine
On Wed, Apr 28, 2010 at 8:33 AM, Pierre Giraud
pierre.gir...@camptocamp.com wrote:
 I don't totally agree with you Eric.
 I looks like Jeff's problem is that the mouse position div is not cleared
 when the map is destroyed.
 I think that it's OpenLayers' job to clear the div. It's probably as simple
 as giving div's innerHTML an empty string in the destroy method of the
 control.

Right, OpenLayers should just not remove the div. Jeff, feel free to
open a ticket for that issue. Thanks,


-- 
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.lemo...@camptocamp.com
http://www.camptocamp.com
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users