[OpenLayers-Dev] Feature disappears when zoom in to the last level on IE

Andreas Hocevar ahocevar at opengeo.org
Tue Jan 27 09:39:26 EST 2009


Hi Albert,

Albert Rovira wrote:
>  > Yes, please post the whole linestring. I suspect that your line is a
>  > very long one, covering a huge distance on the globe. We have fixed a
>  > similar issue in the SVG renderer, but the VML renderer (the one that
>  > IE uses) did not show any misbehavior with our test data. So if you
>  > provide the whole test geometry, we can check what is wrong here.
>  >
> 
> Yes, really, It's very long:
> 
> LINESTRING(2.8232342584766705 41.982597569578594, 2.820341683261403 
> 41.98207671395145, 2.816577742220418 41.98299154728675, 
> 2.8127958348737487 41.982363852836976, 2.810765642331356 
> 41.9826643456329, 2.8038665809483576 41.98210342460008, 
> 2.8006685785364467 41.98142897729179, 2.7957817433901564 
> 41.985629131861195, 2.7931406964544774 41.98695122174946, 
> 2.794021045433037 41.988199836989594, 2.7926017072839304 
> ...
>  > Just some background information: issues like that occur because the
>  > renderer needs a coodinate space, which is very large at high
>  > resolutions (because we don't want to lose accuracy). SVG (at least in
>  > FF) has a known limitation in significance of coordinate numbers, and
>  > in SVG we have worked around this limitation by clipping the geometry.
> If you go to coordinate 2.14837,41.32518 and zoomin to last level it 
> disappears !!

Ok, I tested your linestring. And the issue here is exactly what I 
thought: your geometry's extent is too large to fit into the VML 
coordinate space at high resolutions.

Attached is a quick'n'dirty fix for your issue, but if you apply the 
patch you will notice that dragging the map almost becomes impossible 
due to the huge amount of vertices. Instead of working with such 
geometries, I would recommend using a server that supports bbox 
filtering, and adding the layer with a bbox strategy. This will reduce 
the number of vertices and allow for quick map dragging.

Regards,
Andreas.

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VML.diff
Type: text/x-patch
Size: 712 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090127/5a3b45f8/VML.bin


More information about the Dev mailing list