[mapserver-users] zooming in on selected polygon

Puneet Kishor pkishor at GeoAnalytics.com
Tue Jul 24 12:06:45 EDT 2001


ok, I finally figured out how to highlight a polygon based on an id...

I created a highlight layer with "status" to "off". Then, if my url or form
contains an id, the status of the highlight layer is set to "on", and 

$classObj->setexpression("\"$id\"") does the trick... 

thanks SDL, for pointing out the correct way to quote the expression in one
of your emails... not at all clear from the docs.

Four questions follow: 

1. is the above the most optimal way of doing the above?

2. what about session specificity? way, user1 queries the mapserver with
id=1 and that poly gets highlighted, while at the same time user2 queries
the mapserver with id=2? are these treated as separate sessions? I am
passing the PHPSESSID in the url, btw.

3. how do I zoomin to the highlighted poly? Essentially, I want to find its
mapextent, and then feather it by 5% or 10% and then create the map.

4. if I pass a range of ids, say id=1-44, can I
	- do a sql-ish or regex setexpression so all ids between 1 and 44
light up?
	- how do I calculate the smallest bounding box that contains all the
44 highlighted polys?

Many tia as usual.

pk/

--
Puneet Kishor 
pkishor at geoanalytics.com
www.geoanalytics.com

GeoAnalyics, Inc.
1716 Fordem Ave
Madison WI 53704
 



More information about the mapserver-users mailing list