[mapserver-users] How to get layer name in an identify template?

Bistrais, Bob Bob.Bistrais at maine.gov
Fri Jul 6 06:07:55 PDT 2012


Actually, there are no query strings there.  The data sources are all shapefiles, it's a case of "show me everything with one symbol" for each layer.  They are all displayed pretty much the same way.

But here's the mapfile metadata with the itemquery parameters, if that helps...


                METADATA
                                'ows_title' 'Indices'
                                'ows_srs' 'EPSG:26919 EPSG:4326 EPSG:900913 EPSG:3857'
                                'ows_enable_request' '*'
                                'ows_onlineresource' 'http://www.geomoose.org'

                                'itemquery'         'itemquery.html'
                                'itemquery-filteritem' 'tilename'
                                'itemquery-filter'             '/.*[qstring].*/i'
                                'qstring_validation_pattern' '.'

                END


From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
Sent: Friday, July 06, 2012 12:18 AM
To: Bistrais, Bob; mapserver-users at lists.osgeo.org
Subject: RE: How to get layer name in an identify template?

What do your query strings look like? - Steve
________________________________
From: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org> [mapserver-users-bounces at lists.osgeo.org] on behalf of Bistrais, Bob [Bob.Bistrais at maine.gov]
Sent: Thursday, July 05, 2012 2:01 PM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] How to get layer name in an identify template?
I am trying to set up a single template, which will format the results of an identify (query by point).  Many of the layers have the same item names, so I'd like to use the same template for those layers.   I have this working well, except that I'd like the layer name to appear at the top of each query result.  How can I put this in as a variable that MapServer can interpret?

Below is my sample code of the template.  I put [wms_title] in as the variable for the layer name, but this doesn't work:

<!-- MapServer Template -->
<hr/>
<tr>
<td colspan="2"><b>[wms_title]</b></td>        <---I want to replace [wms_title] with something that will return the layer name
</tr>
<tr>
<td align="left"><b>Tile:</b> &nbsp [tilename]</td>
</tr>
<tr>
<td align="left"><b>Download Image:</b> &nbsp <a href=[LINK]>[LINK]</a></td>
</tr>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120706/1d0084c3/attachment-0001.html>


More information about the mapserver-users mailing list