RES: RES: [Mapserver-users] Query on symbols

Murilo Lacerda Yoshida murilo.yoshida@agx.com.br
Wed, 14 Apr 2004 12:04:44 -0300


  Ok, I have the querybypoint implemented into my code. I was wondering
if I click on a symbol, it will work as if I clicked on a shape... So
that I can do a query by clicking on a symbol.
  Thanks,
    Murilo

-----Mensagem original-----
De: Eric Bridger [mailto:eric@gomoos.org] 
Enviada em: quarta-feira, 14 de abril de 2004 11:19
Para: murilo.yoshida@agx.com.br
Cc: 'Palle Due Larsen'; Mapserver List
Assunto: Re: RES: [Mapserver-users] Query on symbols

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@lists.gis.umn.edu
> [mailto:mapserver-users-admin@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@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@agx.com.br>
> To: <mapserver-users@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.





_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users