[OpenLayers-Dev] Bug with Wrap date line & vertors

Gael Lafond G.Lafond at aims.gov.au
Wed Aug 8 22:22:37 PDT 2012


Hello group,

I know, there has been a lot of work around this kind of issues, but I still have some issue with the latest stable build (2.12).

The bug I'm having is easy to reproduce:
1. Take the draw-feature.html example
2. Set the wrapDateLine attribute to true
(line 31)                    "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'}, {wrapDateLine: true});
3. Load the draw-feature.html page in a browser (I try it with both FF and Chrome)
4. Zoom out as much as possible, to see almost the whole world
5. Draw about 10 squares (using "draw box"), touching each other, to cover all the whole equator. Any polygon would do, it's just easier to see with squares / rectangles.
6. Pan around from East to West (or West to East)

I would expect to see squares all around the equator, where ever I pan. But sometime, quite often actually, some squares are missing, up to half of them. Panning up and down do not make them to re-appear. If I pan a little bit more to the side where squares are missing, suddenly all the missing squares appear, covering the whole equator. Panning to where the map was do not make the squares to re-disappear.

The bug occur at any zoom level, but it's more stable and easier to reproduce when (almost) the whole world is visible.

It seems to be a bug related to the date line since the missing polygons are usually from 0 to 180 or from -180 to 0, and having wrapDateLine: false fix it.

I played around with the wrapDateLine: false and it fixed the bug, but it's not a solution since the point of interest of my map is Australia and the pacific ocean. I need the wrapDateLine: true.

I think one solution would be make a copy of all polygons, with 360 degrees offset, to be sure to always see at lease one copy (I haven't tried it yet), but I think this solution will double the resources usage of the layer and (most of the time) double the opacity of the semi-transparent styles.

Is anyone have ever found a solution / work around for this?

Thanks
________________________________________
Gael Lafond
Programmer
Australian Institute of Marine Science
PMB 3
Townsville MC
QLD 4810
Ph 4753 4116
g.lafond at aims.gov.au


--  
------------------------------------------------------------------------
The information contained within this transmission is for the
use of the intended recipient only and may contain confidential
and/or legally privileged material and/or material the subject
of copyright and/or personal information and/or sensitive
information that is subject to the Privacy Act 1988. Any review,
re-transmission, disclosure, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited. If you have received this email in error please
notify the AIMS Privacy Officer on (07) 4753 4444 and delete
all copies of this transmission together with any attachments.
------------------------------------------------------------------------



More information about the Dev mailing list