Posted on Mar 23, 2011 by
Grumpy Horse
What steps will reproduce the problem? 1. http://myhost.com/geocache/demo 2. switch to the GoogleMapsCompatible layer 3. All I see it water
The issue is that in OpenLayers you need to set units:'m' for sphericalMercator projections. Notice in the following the addition of the units item. This will fix the problem.
maxExtent: new OpenLayers.Bounds(-20037508.342789,-20037508.342789,20037508.342789,20037508.342789),
units: 'm',
projection: new OpenLayers.Projection("epsg:900913")
I looked at the code and was not sure what the right fix was. Here are some thoughts:
- units: 'dd' is the default so EPSG:4326 works
- we could add the units to the geocache.xml is it is available when creating the demo service
- alternatively, we could add a hack to the current service_demo.c code to check if the the srs string contains 900913 or 3857 and add a line for the units.
I can develop and test a patch for 3. and attach it if that is the way you want to go, but might leave 2. up to you ;)
Comment #1
Posted on Mar 24, 2011 by Helpful RhinoThis issue was closed by revision r262.
Status: Fixed
Labels:
Type-Defect
Priority-Medium