[OpenLayers-Users] Control.WMSGetFeatureInfo styles are "undefined"

Frank Broniewski brfr at metrico.lu
Wed Jun 24 09:48:26 EDT 2009


Hello list,

I have a problem with my Mapserver WMS server and the 
OpenLayers.Control.WMSGetFeatureInfo. When the query url is constructed by 
Control.WMSGetFeatureInfo, the styles parameter is a list of "undefined" 
styles: styles=undefined,undefined,undefinded,undefined. And my mapserver 
chokes on the "undefined". Looking at the example 
http://www.openlayers.org/dev/examples/getfeatureinfo-control.html the styles 
parameter is empty. How can I achieve that?
The code (from an earlier RC) for constructing the url references 
layers[i].params.STYLES, but I don't know where that is set. The docs do not 
mention a params property in OpenLayers.Layer, OpenLayers.Grid or 
OpenLayers.WMS. I certainly didn't set any layer parameters named styles ;-)

Well what can I do to solve my undefined style issue?

If necessary I can set up a minimal example ...

// the WMS layer
	var strasse = new OpenLayers.Layer.WMS (
				strasse_layername,	routes_url,
				{ layers: ['autorouten','radwege','wanderwege','pois'], format: 
'image/png', transparent: true },
				{ isBaseLayer: false, singleTile: true } );

// the WMSGetFeatureInfo control
    var infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo(
                { url: routes_url,
                  title: 'Identify features by clicking',
                  layers: [strasse],
                  queryVisible: true,
                  infoFormat: 'application/vnd.ogc.gml' } ) };
    infoControls['click'].events.register("getfeatureinfo", this, showInfo);
    map.addControl(infoControls['click']);
-- 
Frank Broniewski

Metrico s.àr.l. ( http://www.metrico.lu )
36, rue des Romains 
L-5433 Niederdonven 
Luxembourg

Fon: +352 26 74 94 28 
Fax: +352 26 74 94 99



More information about the Users mailing list