[Mapserver-users] Query template - Extract: Layer Class Name
Julien, Heryk
hjulien at nrcan.gc.ca
Wed Jan 7 06:56:08 PST 2004
Hi,
Here is the context. I've integrated Mapserver in Coldfusion (Macromedia web
server) and I'm using session variables to manage Mapserver requests.
For example when I query a feature on a map, a Mapserver query or WMS query
string is dynamically generated by coldfusion (depending on source of the
layer) and sent directly to the server giving the MapService. In the present
case a query is sent to Mapserver. Mapserver receives the request and sends
a query response in html using the query template specified in the mapfile.
What i would like to do is include the features legend symbol and
description in the query response. This will permit me to have a query
response which will include the queried feature shapefile dbf info and
corresponding legend description (legende image, layer name, class name...).
Users will be able to relate legend elements and query features and make
sure they have selected the desired featured.
I've tried integrating the following tags in the query template without
success.
[map_layer_class_name]
[map_layer_name]
[leg_layer_html]
[leg_layer_name]
[/leg_layer_html]
[leg_class_html]
[leg_class_name]
[/leg_class_html]
They are not interpreted. The only tags interpreted are the ones fetching
information in my dbf.
Do you have other suggestions.
Thanks for the help.
Heryk
-----Message d'origine-----
De : Martin, Daniel A [mailto:Daniel.A.Martin at erac.com]
Envoyé : Tuesday, January 06, 2004 5:17 PM
À : Julien, Heryk
Cc : mapserver-users at lists.gis.umn.edu
Objet : RE: [Mapserver-users] Query template - Extract: Layer Class Name
Well, I'm not quite sure. I don't know of a built-in variable. I guess I
would want to know how your user reaches this query page. If it is from a
link/submit from a prior page that DOES have a legend, I would pass the item
name as a custom variable.
For instance, I use a custom variable called "title" that I pass between
every map as a hidden element of the map form. I can reference this
variable in my template simply as [title] because MapServer is smart enough
to pull it from the querystring. I place it in my <title> tag in the
header, and output it on the template.
-Dan
> -----Original Message-----
> From: Julien, Heryk [mailto:hjulien at nrcan.gc.ca]
> Sent: Tuesday, January 06, 2004 3:27 PM
> To: Martin, Daniel A
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: RE: [Mapserver-users] Query template - Extract:
> Layer Class Name
>
>
> Daniel,
> Lets say I send this kind of query:
> http://www.cgcq.rncan.gc.ca/cgi-bin/mapserver/mapserv.exe?
> map=d:\webcgcq\gasl_clf\mapserver\mapfiles\transect1.map&
> mode=query&
> layer=Transect1poly&
> imgext=605652.980000+4900665.392862+864417.475000+5159507.282138&
> img.x=189&
> img.y=199&
> IMGSIZE=400%20400&
>
> Since the mode is query, the result is the mapfile query
> template with the feature identifications requested from the
> shapefile dbf. However the legend tags are not interpreted!
>
> Is there a way to retrieve the "layer class name" of the
> object selected in the map so that I may insert it into the
> query template response?
>
>
> Query template:
>
> Code: [CODE]<br>
> Identifiant = [SP_OBJ_ID]<br>
> Dataset_ID = [DATASET_ID]
>
> [leg_layer_html]
> [leg_layer_name]
> [/leg_layer_html]
>
> [leg_class_html]
> [leg_class_name]
> [/leg_class_html]
>
>
>
>
> -----Message d'origine-----
> De : Martin, Daniel A [mailto:Daniel.A.Martin at erac.com]
> Envoyé : Friday, December 19, 2003 4:29 PM
> À : Julien, Heryk; mapserver-users at lists.gis.umn.edu
> Objet : RE: [Mapserver-users] Query template - Extract: Layer
> Class Name
>
>
> [leg_class_name]
> But it must be used within a [leg_class_html] block.
>
> For example, my legend template is attached. I think it is a
> good example of how to effectively use an html template. It
> is designed to be used in your client within a td element, such as:
>
> <table><TR><TD>[legend]</TD></TR></table>
>
> -Dan
>
>
> > -----Original Message-----
> > From: mapserver-users-admin at lists.gis.umn.edu
> > [mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of
> > Julien, Heryk
> > Sent: Friday, December 19, 2003 2:29 PM
> > To: 'mapserver-users at lists.gis.umn.edu'
> > Subject: [Mapserver-users] Query template - Extract: Layer
> Class Name
> >
> >
> > Hi to all,
> > With the object [cl]you can retrieve the current "layer name"
> > from your mapfile and output it into your query template
> > (http://mapserver.gis.umn.edu/doc40/template-reference.html#qu
> ery). Is there a way to retrieve the "layer class name" of
> the object selected in the map so that I may insert it into
> the query template response?
>
> Thanks
> ==========================================
> Héryk
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
>
More information about the MapServer-users
mailing list