[OpenLayers-Users] Selected attributes in Pop up

adityakumar529 adityakumar529 at gmail.com
Thu May 2 08:01:32 PDT 2013


Dear Users,
   I am trying to display only specific attributes out of total attributes
in my WMS layer.
Following is the code used for that.

var roadidPicker = new OpenLayers.Control.WMSGetFeatureInfo({
                url:
'http://localhost/ArcGIS/services/Civic_Agency_15_11_11/MapServer/WMSServer', 
			
             
                queryVisible: true,
            });
    roadidPicker.infoFormat = 'application/vnd.ogc.gml';
    roadidPicker.events.register("getfeatureinfo", this, pickRoadid);
    map.addControl(roadidPicker);
    roadidPicker.activate();
        
        function pickRoadid(event) {
          var val = event.features[0].attributes.Pin_Code;
           alert(val);
            if (event.features && event.features.length) {
                var val = event.features[0].attributes.Address;
                alert(val);
            }



On click I get the value in the form of alert.
But I want the same in popup.
Please share if you have any idea related to it.



Aditya Kumar
India Urban Space Foundation



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Selected-attributes-in-Pop-up-tp5051001.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list