[Mapserver-users] search by attributes
norbert.thieme at ilmenau.baw.de
Mon May 24 04:26:31 EDT 2004
Janeks Kamerovskis schrieb:
> Hi, MapServer users!
> I am beginner in Mapserver.
> I successfully created my first mapserver app. with my own data.
> One of things that I am interested to implement in next version
> of my map is possibility to make some kind of feature search by attributes
> and select or/and zoom to found features.
> Is it possible in MapServer and if is, than could somebody post some info
> about how to do it or drop a link to an example!
> Looking forward for your replay,
> Janeks Kamerovskis
> forestry consultant
> Lat-Fin Joint venture SILVA Ltd
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
I use php/mapscript. If you want to use only CGI this won't help you.
With the querybyattributes method in mapscript you can select the the
searched features and draw them hilited if you want.
I'm also looking for a method to zoom to a selected feature but I
haven't found an easy way yet. The only way I see at the moment with
mapscript is to use the shapeindex of the query result. With the
shapeindex you can use getshape on the layer to get a shape object. You
can then use the bounds of the shape object to set a new extent and draw
an image with that.
I haven't tried it out so I can't tell you how the performance will be.
I hope someone can give a better way to do it.
More information about the mapserver-users