[mapserver-users] Show only one POI on the map
valerio vianello
valerio.vianello at yahoo.it
Tue Jun 17 00:37:35 PDT 2008
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!
http://www.ymailblogit.com/blog/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080617/45fa8008/attachment.htm>
More information about the MapServer-users
mailing list