From: Justin D. <jde...@op...> - 2007-08-30 15:03:20
|
Hi Ali, I should have asked this earlier but what version of GeoServer are you using? Is it 1.5.2 or greater? Ali Khan wrote: > Hey. Tried the solution but I still get all the values. this is what i > get when i click on a country > Results for FeatureType 'ptrs_Indicator1': > -------------------------------------------- the_geom = [GEOMETRY > (MultiPolygon) with 48 points] country_id = 161 country_name = Niger > dept_id = 43100 reg_code = 43100 status_color = red category_caption = > Adult Females category_id = 1 -------------------------------------------- > > Am I missing a file or doing something wrong? Do I need to edit the > catalog or services file or add something special into the URL that is > retrieved? Right now when a user clicks the map the following URL is > called. > var url = > "http://dev.myunfpa.org/geoserver/wms?bbox="+ptrs_Indicator1.map.getExtent().toBBOX()+"&style=Indicator&format=jpeg&info_format=text/plain&request=GetFeatureInfo&layers=geodb:#view_name#&query_layers=geodb:ptrs_Indicator1&width=700&height=362&x="+e.xy.x+"&y="+e.xy.y; > > Do I need to change or add something to tell it to use content.ftl? > Justin Deoliveira wrote: >> Hi Ali, >> >> Using ${feature.dept_id.value} should do the trick. >> >> -Justin >> >> Ali Khan wrote: >> >>> Hey. Currently we've created a content.ftl in the directory of one of >>> our featuretypes,. (geoserver/data/featureTypes/indicator is the path). >>> >>> In this folder we have just the info.xml and content.ftl. >>> >>> On a standard wms get feature info the following is an example of what >>> is returned: >>> Results for FeatureType 'ptrs_Indicator1': >>> -------------------------------------------- the_geom = [GEOMETRY >>> (MultiPolygon) with 49 points] country_id = 37 country_name = Chad >>> dept_id = 40900 reg_code = null status_color = null category_caption = >>> null category_id = null -------------------------------------------- >>> >>> We just want to return the dept_id part so dept_id = 40900 in this case. >>> What do we need to do in our content template to list just the dept_id? >>> I used this but it didn't seem to work: >>> <ul> >>> <#list features as feature> >>> <li>dept_id ${feature.dept_id}</li> >>> </#list> >>> </ul> >>> >>> Thanks, >>> -Ali >>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> Geoserver-users mailing list >>> Geo...@li... >>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>> >>> >>> >>> >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Geoserver-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geoserver-users > > !DSPAM:4007,46d6da3c227901849620573! > -- Justin Deoliveira The Open Planning Project http://topp.openplans.org |