RES: [Mapserver-users] Query on symbols

Eric Bridger eric at gomoos.org
Wed Apr 14 10:18:39 EDT 2004


On Wed, 2004-04-14 at 09:41, Murilo Lacerda Yoshida wrote:
>   But the query mode isn't only for cgi-bin applications? I'm using
> php/mapscript...
>   Thanks,
>     Murilo
> 
> -----Mensagem original-----
> De: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu] Em nome de Palle Due
> Larsen
> Enviada em: quarta-feira, 14 de abril de 2004 03:51
> Para: Murilo Lacerda Yoshida; mapserver-users at lists.gis.umn.edu
> Assunto: Re: [Mapserver-users] Query on symbols
> 
> Hi,
> 
> Use the query mode. You can find it in the documentation.
> 
> Best regards
> 
> Palle Due Larsen
> Carl Bro GIS&IT
> 
> 
> -----Original Message-----
> From: "Murilo Lacerda Yoshida" <murilo.yoshida at agx.com.br>
> To: <mapserver-users at lists.gis.umn.edu>
> Date: Tue, 13 Apr 2004 19:11:55 -0300
> Subject: [Mapserver-users] Query on symbols
> 
> >   Hi all,
> >   I have a basic question. Is it possible to do queries on symbols?
> >   For example, I have a point in my map, and that point has
> > significant
> > data. If I put that point as one layer, or as a feature, and put a
> > symbol on it, if the user clicks on the symbol will I be able to get
> > the
> > data from the dbf?
> >   Did you understand me? I want the symbol to work as a shape
> > element,
> > so that I can do queries on it.
> >   Is it possible?
> >   Thanks,
> >      Murilo

What you want to do is certainly possible with mapscript. Use
$layer->queryByPoint() passing in the geographic point clicked by the
user.  What you get back will depend on the DATA source for the layer.
Typically this is an index into the dbf part of the shape file, or some
unique id for various databases.  This index can then be used to open
the dbf file and get the record or to query your database.




More information about the mapserver-users mailing list