Thanks for the reply, does this mean I cannot use 4326 as an srs for my overlays? I have in the layer declaration srs: 'EPSG:4326', but in firebug I get a bad request 404 reported and in the call it says EPSG 900913.
On Thu, Jan 29, 2009 at 4:34 PM, Christopher Schmidt < [email protected]> wrote: > On Thu, Jan 29, 2009 at 04:18:34PM -0500, Robert Hicks wrote: > > Hello all, > > I am having an issue when I have some WMS Layers over top of a Google > base > > map. Basically what happens is when I toggle to layers on and off in the > > layer switcher the next time the layer appears it is shifted down > relative > > to the Google map. It does not do this with the basic OpenLayers base map > > from http://labs.metacarta.com/wms/vmap0. > > Use spherical mercator. > > http://docs.openlayers.org/library/spherical_mercator > http://openlayers.org/dev/examples/spherical-mercator.html > > -- Chris > > > Here are my layer definitions: > > > > var parcels = new OpenLayers.Layer.WMS( > > "Parcels", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'mylayer_parcels', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var munic = new OpenLayers.Layer.WMS( > > "Municipality", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'mylayer_munic', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var roadcenterlines = new OpenLayers.Layer.WMS( > > "Road Center Lines", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'mylayer_roadcenterlines_ft', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var raster = new OpenLayers.Layer.WMS( > > "Defiance County Raster", geoserverDomain, > > { > > //width: '800', > > srs: 'EPSG:4326', > > layers: 'gv:county', > > //height: '341', > > styles: '', > > format: 'image/png', > > transparent: 'true', > > attribution: "A Service" > > } > > ); > > var vector = new OpenLayers.Layer.Vector( > > "GlobalView", > > { > > attribution:"A Service", > > displayInLayerSwitcher: false > > } > > ); > > map.addLayers([wms, raster, parcels, munic, roadcenterlines, > > vector]); > > // setup controls and initial zooms > > map.addControl(new OpenLayers.Control.PanZoomBar()); > > map.addControl(new OpenLayers.Control.Navigation()); > > map.addControl(new OpenLayers.Control.Scale($('scale'))); > > map.addControl(new OpenLayers.Control.MousePosition({element: > > $('location')})); > > map.addControl(new OpenLayers.Control.LayerSwitcher()); > > map.addControl(new OpenLayers.Control.Attribution()); > > map.setCenter(new > > OpenLayers.LonLat(-84.52,41.35),11,false,false); > > > > Has anyone encountered this? > > > _______________________________________________ > > Users mailing list > > [email protected] > > http://openlayers.org/mailman/listinfo/users > > > -- > Christopher Schmidt > MetaCarta >
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
