I am trying to overlay google streets ontop of my data. I declare my map like
so -

    map = new OpenLayers.Map('map',{controls: [],
    maxExtent: new
OpenLayers.Bounds(-3508.86612616335,5778517.56154675,33162.5587151875,5808814.49155551),
    maxResolution: 'auto',
    scales:
[74153,49435,32957,21971,14648,9765,6510,4340,2893,1929,1286,857,572,381,254,169,113,75,50,33,22,15,10,7,4,3],
    numZoomLevels: 26,
    units: 'm',
    projection: new OpenLayers.Projection("EPSG:3776"),
    displayProjection: new OpenLayers.Projection("EPSG:4326")
    });

And my google layers are declared as -
  //Google Map Layers - Streetview, Satellite, Hybrid
       var layer_Google_Streets = new OpenLayers.Layer.Google("Google
Streets", {numZoomLevels: 20, visibility: false, isBaseLayer: false}); 
       var layer_Google_Hybrid = new OpenLayers.Layer.Google("Google
Hybrid", {type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20, visibility:
false, isBaseLayer: false});
       var layer_Google_Satellite = new OpenLayers.Layer.Google("Google
Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 20,
visibility: false, isBaseLayer: false});

My problem is of course when turning on the google layers it is zoomed out
to the entire world (because I have set pre-defined scales). When I remove
the scales in my map google is still started in the wrong location because I
am defining my map in EPSG:3776. My question is can I program the google
layers to start at a center location that is the same as my map so my
correct city location is displayed.. or is it impossible to get google
layers to match my existing layers with my current setup? Maybe if there is
a way to activate a google layer and switch to the right coordinate system
and then back again when deselected.. not sure. Appreciate any advice on if
this is possible, thanks.
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Question-on-using-Google-Map-layers-with-predefined-scales-can-it-be-done-tp5796769p5796769.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