[Mapserver-users] search by attributes

Norbert Thieme 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
> tel.+371-7804352
> fax.+371-7804340
> mob.+371-9191109
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 
> 


Hi,

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.

Regards,
Norbert



More information about the mapserver-users mailing list