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.
Index: lib/OpenLayers/Renderer/VML.js
===================================================================
--- lib/OpenLayers/Renderer/VML.js	(revision 8773)
+++ lib/OpenLayers/Renderer/VML.js	(working copy)
@@ -700,7 +700,9 @@
             comp = geometry.components[i];
             x = (comp.x/resolution - this.offset.x);
             y = (comp.y/resolution - this.offset.y);
-            parts[i] = " " + x.toFixed() + "," + y.toFixed() + " l ";
+            if(Math.abs(x) < 100000 && Math.abs(y) < 100000) {
+                parts[i] = " " + x.toFixed() + "," + y.toFixed() + " l ";
+            }
         }
         var end = (closeLine) ? " x e" : " e";
         node.path = "m" + parts.join("") + end;
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev

Reply via email to