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

David Fawcett David.Fawcett at state.mn.us
Wed Apr 14 14:10:26 PDT 2004


David could of course be wrong......

It sounds as though Murilo would like to query an area defined by the
outline of the symbol and return attribute data associated with the data
point that is being labeled.  

It is my understanding that when you query a layer (that may have
labels), your query point is compared to the locations (and areas for
poly) of the features in that layer.  The geographic space covered by
the label is not considered when MapServer determines if a point falls
on or within a feature in the data layer.  If you are labeling with an
annotation layer, while it isn't explicit in the documentation, I seem
to remember that you cannot query an annotation layer.  

I would suggest using TOLERANCE to make the queryable area around your
points to be bigger, but it sounds like that causes problems because
they may also query the polygon layer underneath the points.  Do you
need to allow the user the option to query both layers in the same
interface?

David J. Fawcett
MN Office of Environmental Assistance

>>> Eric Bridger <eric at gomoos.org> 4/14/2004 1:23:23 PM >>>
On Wed, 2004-04-14 at 13:35, Murilo Lacerda Yoshida wrote:
>   Ok, so I can't do queries on symbols. But I still have a point
that
> have meaningful data, and I want to show that data, if the user
clicks
> on that point.
>   Do you have a solution for this problem? I can't let the point the
way
> it is, just a point, because in this case the user won't be able to
> click on the point, it is too small...
>   I was thinking in emulate a symbol, using a polygon shape, but in
this
> case if I zoom in the "symbol" would be too big...
>   I'm a little lost, don't know if you noticed it...
>   Thanks again,
>     Murilo
> 
> -----Mensagem original-----
> De: mapserver-users-admin at lists.gis.umn.edu 
> [mailto:mapserver-users-admin at lists.gis.umn.edu] Em nome de David
> Fawcett
> Enviada em: quarta-feira, 14 de abril de 2004 12:29
> Para: murilo.yoshida at agx.com.br; eric at gomoos.org 
> Cc: mapserver-users at lists.gis.umn.edu; palle at mail-online.dk 
> Assunto: Re: RES: RES: [Mapserver-users] Query on symbols
> 
> No
> 
> David J. Fawcett
> MN Office of Environmental Assistance
> 
> >>> "Murilo Lacerda Yoshida" <murilo.yoshida at agx.com.br> 4/14/2004
> 10:04:44 AM >>>
>   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

I'm not sure why David said no. Perhaps I don't understand what you
mean
by querying a Symbol.  querybypoint() is querying the layer based on
where the user clicked the map. Clicking on a symbol just gives you
the
map x and y coordinates, which you must transform into longitude /
latitude and then pass to querybypoint. It will return the index of
any
shapes nearby that point whether they are points, lines or polygons.

Is something not working for you?  There are Perl examples of this in
the wiki.


_______________________________________________
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