[OpenLayers-Users] ArcGIS Server 9.3 example code?

Linde Ackermans roselinda.ackermans at ec.europa.eu
Fri Mar 6 02:55:36 EST 2009


Hello,

Not sure what you want exactly, but I suppose you want an example on how to
call for a WMS service served by ArcGis Server 9.3 ?

This is how :

<...>
    	var map = new OpenLayers.Map($('olmap'));
	var boundaries = new OpenLayers.Layer.WMS("Layer1", 
           
"http://yourservername:8399/arcgis/services/yourWMSservicename1/mapserver/wmsserver",
            { layers: "0", format: "image/png"} );
        var urbanaudit = new OpenLayers.Layer.WMS("Layer2", 
           
"http://yourservername:8399/arcgis/services/yourWMSservicename2/mapserver/wmsserver",
            { layers: "0,1", transparent: "true", format: "image/png"} );

        map.addLayers([Layer1, Layer2]);
        map.addControl(new OpenLayers.Control.LayerSwitcher());
        map.zoomToMaxExtent();
<...>

ArcGIS Server uses numbers for it's layers names ! Don't confuse with the
layers' description.
To see which number corresponds to which layer, check the capabilities file.
That's the only place were you can get this info.

-- 
View this message in context: http://n2.nabble.com/ArcGIS-Server-9.3-example-code--tp2427664p2434423.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list