[OpenLayers-Dev] Polygon vector inverting during zoom/pan,
bug in OL?
ahocevar at opengeo.org
Tue Jul 13 16:48:58 EDT 2010
this issue comes from the coordinate space limitations that we face when rendering vectors that span over large distances on the client side. Recent SVG engines do not seem to have this limitation any more, so you can try to override the coordinate space size by setting
OpenLayers.Renderer.SVG.prototype.MAX_PIXEL = Number.MAX_VALUE
in a script tag after loading OpenLayers.js. But be warned that this may freeze older browsers (e.g. Firefox 2.x).
As a better workaround, I would suggest rendering the features on the server.
On Jul 13, 2010, at 19:20 , Alexei Peters wrote:
> Thanks Andreas,
> Here's the link:
> To find an example of the error, do the following:
> • Using the find box in the upper right hand corner, search for 320 Quincy St and select from the drop down
> • After the left hand panel populates, click on the link for CA Senate 18, under "Elected Officials > State Senate District"
> • The map will zoom out to the polygon defined by that district
> • Center the map on the icon and start zooming in, you'll notice the polygon invert once you get to about the 8th level in the zoom bar
> • If you go to the 9th zoom level the polygon does even more interesting things
> What I don't understand, is the polygon only gets loaded once (when you click the link) and looks fine when zoomed out.
> Any help would be much appreciated.
> Btw: the data is coming from an ESRI REST service and we have a function to convert from ESRI style geometry to OL style.
> Alexei Peters
> Farallon Geographics, Inc.
> On Mon, Jul 12, 2010 at 11:11 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> please provide a minimal, self contained example with just the vector layer that shows the issue. We need this for debugging.
> On Jul 12, 2010, at 19:10 , Alexei Peters wrote:
> > Hey Everyone,
> > We're wrapping up development of a small app and noticed a strange issue with some vector polygons.
> > While zoomed out enough to see the entire polygon everything appears normal (http://dl.dropbox.com/u/8668064/Polygon%20normal.JPG). But after I zoom in several steps the polygon appears to invert and then display some strange behavior (http://dl.dropbox.com/u/8668064/Polygon%20inverted.JPG). In the images I've just barely panned the map and the polygon will flip from normal to inverted.
> > It appears to happen in both FF and IE.
> > Any suggestions on what is going on here?
> > Any help is much appreciated.
> > Cheers,
> > Alexei
> > _______________________________________________
> > Dev mailing list
> > Dev at openlayers.org
> > http://openlayers.org/mailman/listinfo/dev
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Dev