retrying: ensure vector features render for wrapDateLine=true

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

retrying: ensure vector features render for wrapDateLine=true

ivan.price

 

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

 


_______________________________________________
Dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev