RES: [Mapserver-users] Query on symbols

Murilo Lacerda Yoshida murilo.yoshida at agx.com.br
Fri Apr 16 13:20:09 EDT 2004


  Yep, you understood my problem... And you also gave a great
suggestion!!
  I was beginning to code the Eric suggestion, but to do that I would
have to leave some part of the map file hard coded, and I didn't want
to...
  Thanks, I'll try it now, and thanks to all the people who helped me
trough this problem.
    Murilo

-----Mensagem original-----
De: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu] Em nome de Norbert
Thieme
Enviada em: sexta-feira, 16 de abril de 2004 04:00
Para: murilo.yoshida at agx.com.br
Cc: mapserver-users at lists.gis.umn.edu
Assunto: Re: [Mapserver-users] Query on symbols

Hello,

I hope that you found a way to solve your problem. If not I have a 
suggestion that might help. Hopefully I get your problem right. Let's 
see. I think you are using php/mapscript and the querybypoint function? 
And you have symbols on a point layer that should represent the points? 
When you do a click on the symbol you want to get the attributes from 
the points?

Perhaps someone from the list can confirm this because I havn't tried it

yet.

Try this:
Loop through your layers and check the layer->type and when it is 0 then

you have a point layer. Then you can set the tolerance big enough to 
match your symbols. In all other cases you can do your querybypoint on 
the layer with tolerance 0 or what you want.

It could look like:

for ($i=0; $i < $map->numlayers; $i++)
{
   $layer = $map->getLayer($i);
   if ($layer->type == 0)
   {
     if (@$layer->queryByPoint($query_point, MS_MULTIPLE, 10) ==
MS_SUCCESS)
     {

     ..
     ..

     }
   }
   else
   {
     if (@$layer->queryByPoint($query_point, MS_MULTIPLE, 0) ==
MS_SUCCESS)
     {

     ..
     ..

     }
   }
}

Regards,
Norbert
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users







More information about the mapserver-users mailing list