I am trying to display a Google Maps street layer beneath my existing WMS
layer. My WMS layers are setup so the map has a proper maxextent and zoom
levels set (using the scale option) so I can zoom into my whole bounding box
area and zoom in to the appropriate level. However when I try to add a
google layer underneath it is zoomed out way too far to start and when I
zoom in my own WMS layer zooms properly but the Google Maps layer is not
using the same scales apparently. Below is my code to initialize my map and
add the google maps layer, is there anyway to have it use the same
range/scales as my WMS layer does? Not sure if there is a better way to do
this, appreciate any assitance!

               var map;
     
                // begin map defintion
                    map = new OpenLayers.Map('map',{controls: [],
                   
scales:[974000,1867000,3300000,4450000,7075000,14513000,25769000,35654000
,58981000,100000000],
                    maxExtent: new OpenLayers.Bounds(-20037508.34,
-20037508.34, 20037508.34, 20037508.34),
                    maxResolution: 156543.0399,
                    numZoomLevels: 20,
                    units: 'km',
                    projection: new OpenLayers.Projection("EPSG:900913"),
                    displayProjection: new
OpenLayers.Projection("EPSG:4326")
                    }
             );    //end of map definition



  var layer_Google_Streets = new OpenLayers.Layer.Google("Google Streets",
{numZoomLevels: 20, isBaseLayer: false, sphericalMercator: true, visibility:
false});

-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Question-on-using-Google-Map-layers-with-my-existing-WMS-zoom-levels-messed-up-tp5575903p5575903.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to