[mapserver-users] show only some point on the map

valerio vianello valerio.vianello at yahoo.it
Thu Aug 28 03:15:09 PDT 2008


Hi Till,

maybe I forgot to tell you that my data source is a shapefile and not a database.

so if I have good understood the only solution that I have to try is to use an SLD file.

Regards to group the point in such a way in not possible in this case becouse I have a certain number of points and in each request the user should be able to select the point to show.

br,
Valerio.

--- Gio 28/8/08, Till Adams <adams at terrestris.de> ha scritto:
Da: Till Adams <adams at terrestris.de>
Oggetto: Re: [mapserver-users] show only some point on the map
A: valerio.vianello at yahoo.it
Cc: "mapserver" <mapserver-users at lists.osgeo.org>
Data: Giovedì 28 agosto 2008, 10:41

valerio,

OK, I think you may use more than one subvar, but if there are too many, ...

And there is no way to group the points together in any attribute, which 
are shown together?

One solution might be to generate a temporary view in a database (if the 
points come out of such) and then
send the name of the view via subvar to your file.

Even better, generate a string out of your selected gid's like

1,3,45,567,789,790

Send this  Stringvia subvar to your mapfile and use a "WHERE gid IN ('

YOURSTRING ') in your SQL in the mapfile...


Another possible solution might be...hack around and not really fine, 
but write a temporary SLD file - which only works when using mapserver 
as WMS server.
You can let a script write a temporary-SLD file, where your filter is 
set to your ids and apply this to your getmap request 
(&SLD=path/tp/your_name.xml).

To ensure, that only user A uses his filtered SLD, we normally used the 
PHP session ID or sth similar for naming the sld.

Many ideas, find the best way for you...
Regards, Till

> Dear Till,
>
> Thanks for the suggestion.
>
> But with variable substitution I am able to specify only one parameter 
> like
>
> EXPRESSION ([FNR]=%myid%) .
>
> in this case on the map will be shown only one point (if myid is 
> unique) or a group of points (if myid is shared among them)
>
> in my case I want show the points with myid1,myid2,myid3...
>
> how I should set this into the mapfile ?
>
> regards
>
> Valerio
> --- *Gio 28/8/08, Till Adams /<adams at terrestris.de>/* ha scritto:
>
>     Da: Till Adams <adams at terrestris.de>
>     Oggetto: Re: [mapserver-users] show only some point on the map
>     A: valerio.vianello at yahoo.it
>     Cc: "mapserver" <mapserver-users at lists.osgeo.org>
>     Data: Giovedì 28 agosto 2008, 09:35
>
>     Dear Valerio,
>
>     I guess what you need is this:
>     http://mapserver.gis.umn.edu/docs/reference/mapfile/variable_sub
>
>     So add a variable substitution and insert it into your expression in
the 
>     CALL section of your layer.
>
>     Regards,
>      Till
>     > Dear list,
>     >
>     > I have this question:
>     >
>     > I have a map file in which there is a POINT layer that uses a 
>     > shapefile as datasource. Is possible with mapserver to do a
request to 
>     > show only some point on the map ?
>     >
>     > I know that i can show a group of points or only one point using 
>     > FILTER and CLASSITEM into the map file but my goal is a bit
different. 
>     > In my case each poi has an ID into the shapefile, and I want make
a 
>     > request to serve  the follow question:
>     >
>     > Show on map the poi with ID 3,6,8.
>     >
>     > any suggetsion ?
>     >
>     > P.S I'm using CGI interface maybe is this possible to do with
>     mapscript ?
>     >
>     > thanks everybady
>     >
>     > Valerio
>     >
>     >
>     > __________________________________________________
>     > Do You Yahoo!?
>     > Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti
da 
>     >
>      tanto spazio gratuito per i tuoi file e i messaggi
>     > http://mail.yahoo.it
>     >
------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > mapserver-users mailing list
>     > mapserver-users at lists.osgeo.org
>     > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>     >   
>
>
>     -- 
>     ----------------------------------------------------------
>     terrestris GmbH & Co. KG
>     Irmintrudisstrasse 17
>     53111 Bonn
>     Germany
>
>     Till Adams
>     Geschäftsführung
>
>     Tel: +49 (0)228 / 962 899-52
>     Fax: +49 (0)228 / 962 899-57
>     adams at terrestris.de http://www.terrestris.de
>     Amtsgericht Bonn, HRA 6835
>     ---------------------------------------------------------
>
>     Komplementärin:
>
>     terrestris Verwaltungs GmbH
>
>     vertreten durch:
>     Hinrich Paulsen, Till
>      Adams
>
>               
>
>
> __________________________________________________
> Do You Yahoo!?
> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da 
> tanto spazio gratuito per i tuoi file e i messaggi
> http://mail.yahoo.it 


-- 
----------------------------------------------------------
terrestris GmbH & Co. KG
Irmintrudisstrasse 17
53111 Bonn
Germany

Till Adams
Geschäftsführung

Tel: +49 (0)228 / 962 899-52
Fax: +49 (0)228 / 962 899-57
adams at terrestris.de http://www.terrestris.de
Amtsgericht Bonn, HRA 6835
---------------------------------------------------------

Komplementärin:

terrestris Verwaltungs GmbH

vertreten durch:
Hinrich Paulsen, Till Adams



__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080828/fbd04ca1/attachment.htm>


More information about the MapServer-users mailing list