Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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) {

               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
    map: map,
    text: "infos",
    tooltip: "Infos "
    actions["infos"] = action;
share|improve this question
Try "feature.attributes.name1" – atlefren May 28 '13 at 13:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.