Hi List,

i found a bug by using the NavigationHistory control.
If you change the baselayers of a map (for Example in the layerswitcher) the
NavigationHistory registers an moveend Event and saves the same state of the
map again.
if you now try to use the NavigationHistory Control to switch to a previous
state you have to click multiple times.
I think this effekt is caused by calling the setCenter function in the
setBaseLayer function.

I have 2 ideas for solving this Problem and would like to know wich is the
smartest or if there are smarter solutions.

1. unregister the moveend event before calling the setCenter function and
after that register it again.

2. checking the first entry in the previousStack Array of the
NavigationHistory-control and compare it with the current map state. if they
are equal i would not save it in the Array.

Thanks for any help.

With kind regards
Max Weidemann
-- 
View this message in context: 
http://n2.nabble.com/found-little-bug-NavigationHistory-setBaseLayer-tp3865444p3865444.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to