[Users] control which fields are displayed in my Geoext popups

Robert Buckley robertdbuckley at yahoo.com
Thu Jul 21 13:15:14 CEST 2011


Hi,

Standard format... text/html as defined in the Parameter tab in Firebug.

I have read that if the format is changed, then the attributes can be 
manipulated ie fields can be left out. I haven´t seen any code fór it though.

I have tried with the content.ftl file in the geoserver workspaces, but the 
results are pretty grim! I would rather do it in javascript so that everything 
is kept in my app and not spread around different applications.

yours,

Rob





________________________________
Von: "dan at inlet.geol.sc.edu" <dan at inlet.geol.sc.edu>
An: Robert Buckley <robertdbuckley at yahoo.com>
CC: users at geoext.org
Gesendet: Donnerstag, den 21. Juli 2011, 12:24:24 Uhr
Betreff: Re: [Users] control which fields are displayed in my Geoext popups

What is the format of the data coming back from the WMSGetFeatureInfo?

> Hi,
>
> I would like to do the following and after several hours of trying and
> googling
> will have to admit that I haven´t got far.
>
> I want to ...
>
> 1. Restrict the fields displayed in my popup window so that I can control
> which
> fields are displayed. I don´t want to show fid, objectid etc
>
> 2. Ideally I would like to use the accordion layout for when there is more
> than
> one queryable layer, but I can´t find any code to implement this. I have
> seen it
> on Bryan Mcbrides explorer, but apart from that can´t find any
> documentation.
>
> currently I have a popup designed like this...
>
>
> // create the popup
> var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({
> queryVisible: true,
> highlightOnly: true,
> maxFeatures: 5,
> layers: [layer_wea_wms,EnMap_SG_WEA_f]
> });
>
> featureInfo.events.on({
>     getfeatureinfo: function(e) {
>         new GeoExt.Popup({
>             title: "Position:
> "+mappanel.map.getLonLatFromPixel(e.xy).transform(epsg900913, epsg4326),
>             width: 400,
> autoHeight: true,
> layout: 'accordion',
> bodyStyle: 'background-color:#FFF;,font-size:14px;',
>             autoScroll: true,
>             maximizable: true,
>             map: mappanel.map,
>             lonlat: mappanel.map.getLonLatFromPixel(e.xy),
>             html:'<p style="font-size:10px;">Attributen</p><br>'+e.text,
> unpinnable:true,
> anchored: true,
> shadow: true,
> listeners: {
>                     close: function() {
>                         // closing a popup destroys it, but our reference
> is
> truthy
>                         popup = null;
>                     }
> }
>         }).show();
>     }
> });
>
> map.addControl(featureInfo);
> featureInfo.activate();
>
>
>
>
> thanks for any help_______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110721/8330296f/attachment.htm 


More information about the Users mailing list