[OpenLayers-Users] image layers shifted north on gmaps v3 and OSM base layers

Andreas Hocevar ahocevar at opengeo.org
Fri Apr 29 17:30:35 EDT 2011


The answers you got in StackExchange are correct: your images are in
EPSG:4326, which dies not do any vertical stretching. Distance units at the
poles converge to zero. Web Mercator, which Google and OSM tiles are in,
stretches the latitudes, converging to infinity at the poles.

In early OpenLayers days, it was possible to have tiles stretched to losely
match the Google tiles. This is now deprecated, because it adds inaccuracy.
Some other mapping clients still do this, so probably this is the reason why
things worked in your previous implementations.

Having said that, the recommendation above to use WMS instead of image
layers is a good one. GeoServer or MapServer are easy to set up, and can
easily be configured to serve and transform georeferenced images.

Regards,
Andreas.

On Apr 29, 2011 5:21 PM, "Ian Turton" <ijturton at gmail.com> wrote:

On 29 April 2011 10:31, hayley <openlayers at vortex.cx> wrote:
> I've posted the longer story over on ...
Couldn't you use the WMS layer instead?

new OpenLayers.Layer.WMS("Weather Radar",
           "http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?",
           {layers:'RAS_RIDGE_NEXRAD',
            transparent: true,
            format: 'image/png'
           },
           {isBaseLayer: false,
            singleTile: true,
            ratio: 1
           }
       )

See http://ian01.geog.psu.edu/geoserver/www/maps/jessica-groups.html
for a full example. Then assuming you set spericalmecator:true it will
line up over Google just fine.

Ian
--
Ian Turton
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110429/50a43967/attachment.html


More information about the Users mailing list