[OpenLayers-Users] WMSGetInfoFeature control and GML format

Estelle A estelle_ancelet at hotmail.fr
Fri Apr 23 11:11:46 EDT 2010


Hi Guillaume,

Maybe following could help you.
'fiches' is a div in my document.

var infocontrols;
 
function showInfo(evt) {
            

  $('fiches').innerHTML = evt.features[0].attributes.adresse
		+ "</br>" + evt.features[0].attributes.evenement
		+ "</br>" + evt.features[0].attributes.fiche_clpa
		+ "</br>" + evt.features[0].attributes.photo
		+ "</br>" + evt.features[0].attributes.fiche
	;
            }
 
infoControls = {
            click: new OpenLayers.Control.WMSGetFeatureInfo({
                url:
'http://###########.fr/cgi-bin/mapserv?map=/var/www/dev/info.map&', 
                title: 'Identify features by clicking',
                //layers: [Contours_EPA,lineaire_clpa],
                queryVisible: true,
		  infoFormat: 'application/vnd.ogc.gml'
            })    };


        for (var i in infoControls) { 
            infoControls[i].events.register("getfeatureinfo", this,
showInfo);
            map.addControl(infoControls[i]); 
        }

        infoControls.click.activate();




Guillaume Sueur-2 wrote:
> 
> Hi,
> 
> Would any of you know how to set up a WMSGetInfoFeature control asking
> for gml format response ? I'm stuck and confused by
> formatOptions/format/OpenLayers.Format.WMSGetFeatureInfo()/OpenLayers.Format.GML()
> and can't set it up correctly.
> 
> Thanks
> 
> Guillaume
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMSGetInfoFeature-control-and-GML-format-tp4949584p4951020.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list