[OpenLayers-Dev] SVG viewbox problem with minScale
Alexandre Dube
adube at mapgears.com
Mon Jul 28 09:35:15 EDT 2008
Hi Eric,
I opened a ticket : #1631.
Of what I understand, the bug comes from the resolution and inRange
value of the layer. While it's not inRange, our renderer doesn't change
its left and top values, even if we zoom. But, when inRange, it first
checks the resolution. If it changed, then new left-top values are
created but in our case it didn't so the left-top values remain the
sames and when each features is added, they are out of the 15000 pixel
range and are not displayed.
Best regards,
Alexandre
Eric Lemoine wrote:
> You indeed found a bug. Can you open a ticket and attach some code to
> help developpers reproduce it.
>
> Do you observe the same problem if you dont go beyond the 15000 px?
> I.e. go in range, pan w/o going beyond the limit, go out of range,
> pan, and go back in range. I'm trying to understand whether the
> problem comes from the code relating to the 15000px limit.
>
> Thanks. Eric
>
> 2008/7/25, Alexandre Dube <adube at mapgears.com>:
>
>> 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
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>
>>
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Dev
mailing list