i followed a GeoEXT example to create popup menu that gets WMSFeatureinfo on click on the map, What i want to do is to get some specific fields not all the fields, i try the propertyName (with name1,name2 and name3) and defined the wanted fields but id doesn’t work, also i want to change the title by bringing a specific value not the fid but it doesn’t work, here’s the code: am new to this plz how to restrict the fields fetched from WMSGetFeatureInfo request
feature Control, a "button" control
action = new GeoExt.Action({
control: new OpenLayers.Control.WMSGetFeatureInfo({
autoActivate: true,
infoFormat: "application/vnd.ogc.gml",
maxFeatures: 6,
layers: [layers1],
propertyName: "name1,name2,name3",
eventListeners: {
"getfeatureinfo": function(e) {
var items = [];
Ext.each(e.features, function(feature) {
items.push({
xtype: "propertygrid",
title: feature.fid, // here i change it to feature.name1 it doesn't work
source: feature.attributes
});
});
new GeoExt.Popup({
title: "infos",
width: 250,
height: 300,
layout: "accordion",
map: map,
location: e.xy,
items: items
}).show();
}
}
}),
map: map,
text: "infos",
tooltip: "Infos "
});
actions["infos"] = action;
toolbarItems.push(action);
toolbarItems.push("-");
–
Asma OUQALLI
Élève ingénieur : 3ème Sciences d’Information Géographique (SIG).
Chef de commission développement professionnel - Rotaract EHTP.
Chef de cellule Media - Olympiades EHTP 2012.
Ecole Hassania des Travaux Publics.
Mobile : +212 672 48 23 15.
Email : asma.ouqalli@anonymised.com