[OpenLayers-Dev] retrying: ensure vector features render for wrapDateLine=true

Ivan Price Ivan.Price at noveltis.fr
Tue Feb 25 05:40:43 PST 2014


Hi there,

I've already run into this problem in the past and asked this list the question, but i still haven't managed to find a workaround so i'm going to ask again in case a solution has been found in the last 12 months.

I have a layer with vector polygons, generated programmatically in the JavaScript. The map is global, in 3857 proj, with dateline wrapping.. hence we often see the world wrapping on both sides. I would like for the vector polygons to be represented multiple times when appropriate.. as it is they sometimes appear and other times are rendered outside of the screen, and so appear to disappear.

I have tried adding 'mirror' features, i.e. ones where the geometry is shifted right and left by 2*2.003750834E7 meters (360 degrees).. however the new features are rendered on top of the old, despite the fact their geometries are not the same. I have also tried defining the map extent to be an extra globe wide on each side.. but OL always makes the translation and draws them in the same spot.

the only solution i can find is switching to WMS which seems to better support dateline wrapping.

does anyone have any ideas ?

thanks and regards

-ivan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20140225/edb51602/attachment.html>


More information about the Dev mailing list