[OpenLayers-Dev] SVG viewbox problem with minScale

Alexandre Dube adube at mapgears.com
Fri Jul 25 15:14:50 EDT 2008


Hi everybody,

  I use Firefox ( big fan ).
 
  Of what I understand, each time I zoom in or out a map that has a 
vector layer, the left and top values of the rederer's viewbox are 
reseted to 0.

  I have a WFS layer with a minScale: 49999 in my map.  So, the first 
time I get inRange of my layer, left and top are reset to 0.  If I pan, 
they change their value and if their value is 15000 pixels away from my 
original left-top, no feature will be drawn. 

  The problem is if I zoom out of my minScale: 49999, my layer becomes 
inactive.  Zooming out don't reset the left-top values.

  So, if I pan to somewhere else and then zoom in until I get inRange of 
my minScale, my WFS layer shows no features because it's as we didn't 
zoom at all ( the resolution is the same that the time we zoom out of 
range ) .  But, if I zoom in again once, then the features appear 
(because the resolution has changed, and left-top are reseted to 0).  If 
I zoom out once, the features are still there.

  I think the line 504 in SVG.js should be changed.  Instead of doing 
nothing if not inValidRange, it should check again by ignoring the 
resolution.  That would resolve the issue, I think...

Any comments ?

-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Dev mailing list