[OpenLayers-Users] Overlay on Google

moony k_karo at web.de
Tue May 26 04:49:16 EDT 2009


Hello,

I have two baselayers. When I use basemap as baselayer, I could add the
overlay, but with google as baselayer I got a error message "Paramenter
'src' contains unacceptable value". The services are delivered by arcgis
server 9.3.
I cannot see my mistake. What did I forget?
Below is my code. The services are only available within intranet.

Thanks!

var map;
var webproj = "EPSG:102113";
var webextent = new OpenLayers.Bounds(-20037508, -20037508, 20037508,
20037508.34);
var webunits= "m";


function init(){
  var options = { 
        maxExtent : webextent,
	projection: webproj,
        units: webunits,
	maxResolution: 156543.0339,
	numZoomLevels: 9 
        };

  map = new OpenLayers.Map( $('map') , options);

  var gphy = new OpenLayers.Layer.Google(
                "Google Physical",
                {type: G_HYBRID_MAP, 'sphericalMercator': true}
            );
  map.addLayer(gphy);

  var basemap = new OpenLayers.Layer.WMS( "Basemap", 
               
"http://xen1ags:8399/arcgis/services/Monitor/Bevoelkerung_Bundesland_Web_Mercator/MapServer/WMSServer",
                {layers: '0', format: 'image/png', transparent: 'true'}, 
{singleTile: true, isBaseLayer: true});
  map.addLayer(basemap);

  var wms = new OpenLayers.Layer.WMS( "WMS", 
               
"http://xen1ags:8399/arcgis/services/Monitor/Bevoelkerung_Bundesland_Web_Mercator/MapServer/WMSServer",
                {layers: '1', srs: 'EPSG:102113', format: 'image/png',
transparent: 'true'},  {'reproject': false, 'opacity': 0.4, isBaseLayer:
false});
  map.addLayer(wms);



map.setCenter(OpenLayers.Layer.SphericalMercator.forwardMercator(10.205188,51.457593),
6);
 map.addControl(new OpenLayers.Control.LayerSwitcher());
 map.addControl(new OpenLayers.Control.MousePosition());
}

-- 
View this message in context: http://n2.nabble.com/Overlay-on-Google-tp2973539p2973539.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list