[Mapserver-users] Query template - Extract: Layer Class Name
Martin, Daniel A
Daniel.A.Martin at erac.com
Tue Jan 6 14:16:53 PST 2004
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