[OpenLayers-Users] Error in getfeature info

Aditya Kumar paglacontact at yahoo.com
Mon Feb 25 05:15:58 PST 2013


Dear Users,
   I am trying to get onclick selected set of data from the wms layer rather
than display of all the data.
I am using the following code
var roadidPicker = new OpenLayers.Control.WMSGetFeatureInfo({
                url: 'url', 
                title: 'identify features on click',
                layers:[budget],
                queryVisible: true
            });
roadidPicker.infoFormat = 'application/vnd.ogc.se_xml';
//roadidPicker.featureInfoFormat='application/vnd.ogc.gml';
roadidPicker.events.register("getfeatureinfo", this, pickRoadid);
map.addControl(roadidPicker);
roadidPicker.activate();
//map.removeControl(info);
function pickRoadid(event) {
	popupClear();
  if (event.features && event.features.length) {
  alert("hi");
     var val = event.features[0].attributes.id;
     document.getElementById('fid').value = val;
  }
}

But its returning me an error
Cannot set property 'value' of null .


Aditya kumar



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Error-in-getfeature-info-tp5036645.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list