[OpenLayers-Trac] [OpenLayers] #937: Map.setCenter() should not call Layer.moveTo if inRange has changed to false
OpenLayers
trac at openlayers.org
Thu Jan 3 03:19:50 EST 2008
#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:
State: Review |
------------------------+---------------------------------------------------
Comment (by elemoine):
Replying to [comment:15 crschmidt]:
> Ahh, I like it. Though moving display() into calculateInRange is perhaps
the wrong path forward? Does it seem to a non-me person that you would
expect calculateInRange to have side effects like changing the layer
visibility?
>
> Actually, I don't think this does what I want it to do (I'm sorry, I
know I'm not being helpful here) -- the problem is that if someone
overrides calculateInRange, I don't see when display() will ever be
called. So although this works for the case where it's just 'return true',
it doens't work if someone has updated calculateInRange to only display
for certain zoom levels. Perhaps this use case doesn't matter --
calculateInRange should only be overridden to either do 'return true' or
not overridden at all -- but I'd like to make sure that other people at
least feel that way before we commit this...
----
Right, having calculateInRange change the layer visibility might indeed
not be appropriate. I'll work on another patch...
--
Ticket URL: <http://trac.openlayers.org/ticket/937#comment:16>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list