[OpenLayers-Users] WMSGetFeatureInfo not working as expected with ESRI ArcGIS server

Linde Ackermans roselinda.ackermans at ec.europa.eu
Mon Jun 8 08:51:39 EDT 2009


Hi,

Server = ArcGIS Server 9.3
Code :
var q1 = new OpenLayers.Layer.WMS("q1",
                                
"http://server/arcgis/services/s1/mapserver/wmsserver",{layers: "0"});
var q2 = new OpenLayers.Layer.WMS("q2",
                                
"http://server/arcgis/services/s1/mapserver/wmsserver",{layers: "1"});
var q3 = new OpenLayers.Layer.WMS("q3",
                                
"http://server/arcgis/services/s2/mapserver/wmsserver",{layers: "0"});

var infoCtl = new OpenLayers.Control.WMSGetFeatureInfo({
    	layers: [q1,q2,q3],
        title: 'Click on the map to get information on layers',
        queryVisible: true,
        infoFormat: 'application/vnd.ogc.wms_xml'
        });
var infoOpts = {iconCls: 'queryonclick',toggleGroup: 'map'};
	infoCtl.events.register("getfeatureinfo",map,showInfo);
toolbar.addControl(infoCtl, infoOpts);

function showInfo(evt) {
        ...
	}

I assume this works for most map-servers, because their wms url points to a
kind of 'pool' for all layers, but ArcGIS server has a different url to use
for each different service ...  as you can see in the definition of the
layers q1 and q2 (same service) and q3 (other service).

On mouse click, this is sent to the server :
http://server/arcgis/services/s1/mapserver/wmsserver?service=WMS&version
=1.1.0&request=GetFeatureInfo&layers=0,1&query_layers=0,1&styles=,&bbox=2397751.148714%2C2793354.476705%2C6652248.851286%2C3941645.523295&srs=EPSG%3A3035&feature_count=10&x=289&y=160&height=217&width=804&info_format=application%2Fvnd.ogc.wms_xml

So, layers of the same service are correctly combined ( 0 and 1 ), but
layers from other, additional services are lost.
Is this the normal behaviour ?  ( AGS being a bit 'abnormal' ... )
And if so, how do I solve/workaround this best ?

Linde


-- 
View this message in context: http://n2.nabble.com/WMSGetFeatureInfo-not-working-as-expected-with-ESRI-ArcGIS-server-tp3042742p3042742.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list