[OpenLayers-Dev] Re: [OpenLayers-Users] Dateline WMS & vector drawing issue

Andreas Hocevar ahocevar at opengeo.org
Fri May 20 03:36:02 EDT 2011


Phil, Till,

(moving this thread to the dev list),

looks like we are now in a situation where we can get things moving
again. terrestris has an OpenLayers core developer (Marc Jansen), and
Phil has the insight (see
http://trac.osgeo.org/openlayers/ticket/2787). Previously, I have been
supporting Phil with advice and patches, but had no time recently to
continue doing so.

The next thing to do would be for Till to test if the #2787 patches
solve the issues, and then Marc can maybe add tests so we can commit
#2787.

Andreas.

On Thu, May 19, 2011 at 11:43 PM, Phil Scadden <p.scadden at gns.cri.nz> wrote:
> Welcome to the world of endless frustration. Who would have thought that
> in the 21st century, programmers were still living on a flat earth. Back
> engineering to fix this flat earth philosophy is a mega hassle and you
> must be careful not to break use of mapping on non-earth applications,
> ha ha. However...
>> first problem:
>> The measuring (and drawing) over the dateline does not work. There was
>> an issue about exactly the same problem last august on the dev-List with
>> an attached kind of "patch", but that one does not work properly
>> (http://lists.osgeo.org/pipermail/openlayers-dev/2010-August/006360.html)
>> and causes funny behavings.
> I think I have more code patched in similar ways than are in that
> patches, however there are other tricks that you need too.
> Assuming you have put in ALL the patches associated with that ticket
> 2782, http://trac.osgeo.org/openlayers/ticket/2787, then your
> measureControl should also look like:
>      measureDistanceControl = new OpenLayers.Control.Measure(
>                                     OpenLayers.Handler.Path, {
>                                                 persist: true,
>                                                 geodesic: true,
>                                                 handlerOptions: {
>                                                         layerOptions:
> {styleMap: drawStyleMap},
>                                                     citeCompliant :false
>                                                 }
>                                     }
>          );
>      measureDistanceControl.events.on({
>                                         "measure": processMeasurements,
>                                         "measurepartial":
> processMeasurements
>      });
>      measureAreaControl = new OpenLayers.Control.Measure(
>                                         OpenLayers.Handler.Polygon, {
>                                                 persist: true,
>                                                 geodesic:true,
>                                                 handlerOptions: {
>                                                         layerOptions:
> {styleMap: drawStyleMap},
>                                                     citeCompliant :false
>                                                 }
>                                         }
>                                        );
>     measureAreaControl.events.on({
>                                     "measure": processMeasurements,
>                                      "measurepartial": processMeasurements
>                                  });
>
> ie note geodesic= true, citeCompliant=false. In fact, make sure you have
> these set for any of your path handlers (eg whatever you use in
> DrawFeature).
>
> If this still isnt working, then contact me, as I may have more patches.
> Note also that these patches havent made it to 2.11, - I simply havent
> had the time to learn the test environment and make tests.
>> Also the WMS-layers are not drawn over the dateline. We worked with the
>> "wrap dateline" parameter, but using this requires tiling and tiling
>> causes much more requests and images to be loaded by the client. We have
>> about 30-40 WMS in the application. A tiling will slow down the
>> application (especially the client) and at least lets crash slow
>> browsers like IE8 (indeed - IE9 is a lot faster).
> I havent really figured out what wrapdateline is supposed to do but
> mostly it turns maps into wierdness with vector layers repeated out of
> place. The biggest problem however seems to be having a wms server that
> understands the dateline. Geoserver 2.1 and a patched version of
> geoserver 2.02 are supposed to. I havent got 2.1 up yet but the patch
> only sort of worked with a great deal of odd behaviour around polygons
> that cross the dateline (depending on native projection) and tiles that
> cut in and out depending on whether dateline is to east or west of your
> screen midpoint. I'm not convinced yet that this isnt an openlayers bug.
> I even requested quote from geosolutions for fixing bug in geoserver but
> they have been very slow coming back.
>
> We had decided to defer this issue till geoserver 2.1 came out and then
> work out precisely where blame lies and try and fix it ourselves. We are
> in process of getting geoserver 2.1 up (glacial IT processes not
> helping). Other WMS servers dont seem better. We've been screaming at
> ESRI about 180 line since oh about ArcInfo version 4 (when we became
> customers). Some things work but google projection isnt one of them at
> least in 9.2. The last comment we had from them implied that since web
> mercator didnt have envelopes, it would never work on 180 line. At the
> point we dropped it and moved to geoserver which offered some hope and
> we could get the source.
>
> The very best of luck and I am ready to help in any way I can. Feel free
> to email direct.
> --
> Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St,
> Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
>
> Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Dev mailing list