I resolved the problem.
Following is the code which I used.

        
var roadidPicker = new OpenLayers.Control.WMSGetFeatureInfo({
                url:
'http://localhost/ArcGIS/services/CivicAgency_15_11_11/MapServer/WMSServer', 
                title: 'identify features on click',
                //layers: [BDA],
                queryVisible: true,
            });
    roadidPicker.infoFormat = 'application/vnd.ogc.gml';
    roadidPicker.events.register("getfeatureinfo", this, pickRoadid);
    map.addControl(roadidPicker);
    roadidPicker.activate();
        
        function pickRoadid(event) {
                        map.addPopup(new OpenLayers.Popup.FramedCloud(
                        "chicken", 
                        map.getLonLatFromPixel(event.xy),
                        null,
                       "<div style='font-size:.8em; font-weight: bold'>"
+event.features[0].attributes.Local_Unit+
"Ward No:" +event.features[0].attributes.Address+
"</div>",
                        null,
                        true
                    ));
                                
        }



Aditya kumar



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Selected-attributes-in-Pop-up-tp5051001p5051290.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to