[mapserver-users] record element in query header
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Wed Apr 7 12:15:25 PDT 2010
Thanks!
Here is more details on what I need to do
Suppose I have one layer which contains the province in canada and their
cities.
When the user hover or click on a province, I want this information in a
popup or a div (the client is openlayers and I use
OpenLayers.Control.WMSGetFeatureInfo)
If the user click on the province of Quebec....
There are 2000 cities in Quebec
1: city name 1
2: city name 2
...
2000: city name 2000
So In this case I think a field name should be supported in a header
template
Perhaps I misunderstood what should be managed by the client or the
server??
thanks again
Steve
Daniel Morissette <dmorissette at mapgears.com>@lists.osgeo.org
Envoyé par : mapserver-users-bounces at lists.osgeo.org
07/04/2010 02:16 PM
A
mapserver-users at lists.osgeo.org
cc
Objet
Re: [mapserver-users] record element in query header
Steve.Toutant at inspq.qc.ca wrote:
>
> If I put [provincename] in the template I got the value, per example
> In the Template
> [lrn]: [provincename] - [elementname]<br>
>
> The result is:
> 1: Québec - blabla 1
> 2: Québec - blabla 2
> 3: Québec - blabla 3
>
> But I don't want to put it in the template since the same information
> will be repeated.
> thanks for your help!
I'm not exactly sure if a field name should be supported in the header
template, but based on a quick browse of the code there are two other
ways you could possibly pass the information (depending on what you have
on the client side):
1- You can use parameters from the URL in a template tag. e.g. if you
pass myprov=Quebec in the URL then you should be able to use [myprov] in
your template.
2- You can reference layer-level metadata in query templates using
[metadata_...]
(Those are untested hints based on a quick browse of the source)
Daniel
--
Daniel Morissette
http://www.mapgears.com/
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100407/febc122b/attachment.htm>
More information about the MapServer-users
mailing list