Fw: Calculate extents based on points

Joel Firestone mms at GNETCONSULTING.COM
Mon Jan 31 08:49:47 PST 2005


Dear List:

I'm looking for a possible calculation/code snippet that I could calculate
an extent, based on the max points returned.

Here's my scenario:

 I do a query on a db, based on given criteria.  I plot the results on
 a map.  If no state is chosen, I have a default view I display (basically
 the east coast of the US).  What I would like to do is zoom in, using
 the min and max decimal degrees calculated.

 So, if the top-most point was in NJ, and the bottom-most was in MD,
 it would just include those areas, and not the default east coast view.

 I hope this makes sense.  I'm using PHP/MapScript with MapServer
 4.2.5.

 Thanks for your time and help.

 Joel



More information about the MapServer-users mailing list