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

Ian Turton ijturton at gmail.com
Fri Apr 29 11:21:51 EDT 2011


On 29 April 2011 10:31, hayley <openlayers at vortex.cx> wrote:
> I've posted the longer story over on the GIS StackExchange here:
> http://gis.stackexchange.com/q/8981/2780
> So I'll just try to sum up here:
> I'm trying to transition from a Mapstraction/Google Maps based system to
> using OpenLayers with Google Maps v3 base layers (though I'm also having the
> same problem using OSM as a base layer).
> As far as I can tell, it's only the image layers that are giving me
> problems; the vector based layers seem to line up correctly when compared to
> the old system.
> I have 2 image layers where I'm setting the same bounds as I was using on
> the old system, but both of them appear to be shifted north.

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


More information about the Users mailing list