[mapserver-users] Show only one POI on the map
Hans Castorp
hanscastorp76 at yahoo.es
Tue Jun 17 00:57:15 PDT 2008
Hi Valerio,
Do you know how to do the same (runtime
variable substitution) using Mapscript instead of using the url??
Thanks in advance.
________________________________
De:mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] En nombre de valerio
vianello
Enviado el: martes, 17 de junio de 2008 9:38
Para: Tamas Szekeres
CC: mapserver
Asunto: Re: [mapserver-users] Show only one POI on the map
Hi Tomas,
I have found a first solution to my problem.
I used the cookies to store the variable value end I update the cookie value only when the variable change.
and then in a javascript I update the value of the post field before submit the page.
I'm searching for other solution that don't use cookies...
thanks
Valerio
--- Mar 17/6/08, valerio vianello <valerio.vianello at yahoo.it> ha scritto:
Da: valerio vianello <valerio.vianello at yahoo.it>
Oggetto: Re: [mapserver-users] Show only one POI on the map
A: "Tamas Szekeres" <szekerest at gmail.com>
Cc: "mapserver" <mapserver-users at lists.osgeo.org>
Data: Martedì 17 giugno 2008, 08:04
Hi Tomas,
My demo is on my local machine for now...but I will show you part of the map file and template file.
this is the layer in which i use the variable the map file is called "map1.map"
# Start of LAYER DEFINITIONS ---------------------------------------------
LAYER #show single poi
NAME floor_1_Show_Pois
DATA POIs
STATUS OFF
TYPE POINT
CLASSITEM "country"
FILTERITEM 'floor'
FILTER 'f.1'
LABELITEM "name"
TOLERANCE 7
CLASS
NAME 'single_poi'
EXPRESSION '%ccountry%'
TEMPLATE '../templates/pois.html'
STYLE
COLOR 0 0 0
SYMBOL '../symbols/flag_blue.gif'
END
LABEL
COLOR 0 0 0
TYPE BITMAP
SIZE MEDIUM
ANTIALIAS TRUE
POSITION LC
FORCE TRUE
PARTIALS FALSE
BUFFER 4
END # end of label
END #CLASS
END # layer Pois with label
#end ---------------------------------------------
when I click on same point in the map using mapserver query mode a new page is loaded where there is this link to reload the same map file to show only one pois:
<a href="/cgi-bin/mapserv50?map=/var/www/map1.map&layers=floor_1 floor_1_Show_Pois&ccountry=[country]&imgext=[state]&imgxy=[center]">Show on Section </a>
the page is loaded correct but if I try for example to query to poi I have non response or if I zoom in or zoom out into the map the poi disappears.
I tried to use the field in the template
<input type="hidden" neme="ccountry" value="[ccountry]">
but the value of [ccountry is replaced only the first time with the correct value then its value become the string "[ccountry]"...
any suggestions ?
best regards
Valerio
--- Lun 16/6/08, Tamas Szekeres <szekerest at gmail.com> ha scritto:
Da: Tamas Szekeres <szekerest at gmail.com>
Oggetto: Re: [mapserver-users] Show only one POI on the map
A: valerio.vianello at yahoo.it
Cc: "mapserver" <mapserver-users at lists.osgeo.org>
Data: Lunedì 16 giugno 2008, 20:03
Valerio,
I don`t think if anything is preserved across the subsequent requests
in the cgi mapserver so you might have to apply the substitution on
each request.
However I`m not sure I could catch the problem exactly, do you have
mapfile/URL examples?
Best regards,
Tamas
2008/6/16 valerio vianello <valerio.vianello at yahoo.it>:
> Hi Tamas,
>
> I have a bit issue
...
> Do you know how lock the variable value until the next changing ?
>
> Now I am able to show only one poi in the map but if I try to query it I
> have no results as response. I have done a lot of test and I think the
> problem is on variable value. after the page is loaded the value of
> parameter
> (EXPRESSION '%ccountry%' ) in the map file lose its past value
and so the
> mapserver cgi haven't reference to it anymore.
>
> any suggestion ?
>
> Best regards
> Valerio.
>
> ________________________________
> Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua
> opinione!
________________________________
Scopri il Blog di Yahoo! Mail: trucchi, novità, consigli... e la tua opinione!
________________________________
Scopri il Blog
di Yahoo! Mail: trucchi, novità, consigli... e la tua opinione!
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 270.3.0/1505 - Release Date: 16/06/2008 7:20
______________________________________________
Enviado desde Correo Yahoo! La bandeja de entrada más inteligente.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080617/1b8180ae/attachment.htm>
More information about the MapServer-users
mailing list