LABELITEM in TEMPLATE or dynamic template

Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

LABELITEM in TEMPLATE or dynamic template

Luca Delucchi
Hi all,

I have a WMS service based on a Postgis table, it has several columns
used by several layers in MapServer to classify it.
Is it possibile to use the LABELITEM value in the template? Is there
any other way to change the value in the template without extra
parameter in the WMS request?

Otherwise I see only the way to create several template files, one for
each layer...

--
ciao
Luca

www.lucadelu.org
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: LABELITEM in TEMPLATE or dynamic template

Lime, Steve D (MNIT)
I don’t get what you mean by template - are you really talking about a query template (either via TEMPLATE or a template-driven output format) or something else? --Steve

-----Original Message-----
From: mapserver-users [mailto:[hidden email]] On Behalf Of Luca Delucchi
Sent: Monday, April 16, 2018 9:46 AM
To: MapServer <[hidden email]>
Subject: [mapserver-users] LABELITEM in TEMPLATE or dynamic template

Hi all,

I have a WMS service based on a Postgis table, it has several columns
used by several layers in MapServer to classify it.
Is it possibile to use the LABELITEM value in the template? Is there
any other way to change the value in the template without extra
parameter in the WMS request?

Otherwise I see only the way to create several template files, one for
each layer...

--
ciao
Luca

www.lucadelu.org
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: LABELITEM in TEMPLATE or dynamic template

Luca Delucchi


Il lun 16 apr 2018, 22:09 Lime, Steve D (MNIT) <[hidden email]> ha scritto:
I don’t get what you mean by template - are you really talking about a query template (either via TEMPLATE or a template-driven output format) or something else? --Steve

A query template, in the template it is required to set [item name="column_name"] I would like to set [item LABELITEM] or something similar 

Thanks
Luca 

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: LABELITEM in TEMPLATE or dynamic template

Lime, Steve D (MNIT)

You can’t get at core properties through the template tags. You can get at anything you pass in to a request so if you’re dynamically setting the labelitem then you could exploit that. I believe you can also get at values stored in the metadata block so you could use that. Syntax is [layername_meta data key]… It would be interesting to learn a little more about your setup to see if there is a more expedient way to do what you’re after.

 

--Steve

 

From: Luca Delucchi [mailto:[hidden email]]
Sent: Monday, April 16, 2018 11:44 PM
To: Lime, Steve D (MNIT) <[hidden email]>
Cc: MapServer <[hidden email]>
Subject: Re: [mapserver-users] LABELITEM in TEMPLATE or dynamic template

 

 

Il lun 16 apr 2018, 22:09 Lime, Steve D (MNIT) <[hidden email]> ha scritto:

I don’t get what you mean by template - are you really talking about a query template (either via TEMPLATE or a template-driven output format) or something else? --Steve

 

A query template, in the template it is required to set [item name="column_name"] I would like to set [item LABELITEM] or something similar 

 

Thanks

Luca 


_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: LABELITEM in TEMPLATE or dynamic template

Luca Delucchi
On 20 April 2018 at 17:22, Lime, Steve D (MNIT) <[hidden email]> wrote:
> You can’t get at core properties through the template tags. You can get at
> anything you pass in to a request so if you’re dynamically setting the
> labelitem then you could exploit that. I believe you can also get at values
> stored in the metadata block so you could use that. Syntax is
> [layername_meta data key]… It would be interesting to learn a little more
> about your setup to see if there is a more expedient way to do what you’re
> after.
>

Thanks a lot for your support, so I solved my problem using this
syntax in the template

[item name=[metadata_gml_include_items]]

in the metadata section is set

gml_include_items "MYCOLUMN"


>
> --Steve
>


--
ciao
Luca

www.lucadelu.org
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users