[Mapserver-users] Query on symbols
Norbert Thieme
norbert.thieme at ilmenau.baw.de
Thu Apr 15 23:59:58 PDT 2004
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
More information about the MapServer-users
mailing list