[OpenLayers-Trac] [OpenLayers] #937: Map.setCenter() should not call Layer.moveTo if inRange has changed to false
OpenLayers
trac at openlayers.org
Fri Dec 7 17:10:46 EST 2007
#937: Map.setCenter() should not call Layer.moveTo if inRange has changed to
false
------------------------+---------------------------------------------------
Reporter: crschmidt | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.6 Release
Component: Map | Version: 2.4
Resolution: | Keywords: review
------------------------+---------------------------------------------------
Comment (by elemoine):
In !OpenLayers.Map:setCenter() moveTo() is called unconditionally on the
base layer. So, if you make !OpenLayers.Layer.moveTo() empty,
Layer.display() won't be called for the base layer. I'm not quite sure
about the consequences of this, but I just want to mention that this
change could have side-effects. Thinking a bit more about, I guess the
map's current base layer is always visible (map.baseLayer.visibility is
always true), so it doesn't make sense to call display(true) on the base
layer on each map.setCenter(). So from my analysis, with your patch,
!OpenLayers.Layer.moveTo() could be empty and implemented only in
subclasses.
Your patch looks good to me, but I'd like someone else's opinion on it.
Someone that has more experience with these quite sensitive bits.
--
Ticket URL: <http://trac.openlayers.org/ticket/937#comment:10>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list