[Mapserver-dev] mapscript layerObj->bounds property or layerObj->getBounds() method

Daniel Morissette dmorissette at dmsolutions.ca
Thu Apr 15 15:45:26 EDT 2004


AARON KONING wrote:
> 
> Just wondering if there are any plans to include a bounds property for the layerObj class in mapscript?
> This would help when creating zoomToActiveLayer and zoomToAllLayers types of functions.
> I realize the bounds of a shapefile can be discovered through the shapefileObj class, but their is no method available for determining bounds in other data sources (eg: postgis).
> I suppose one could get around this by parsing the connection and data properties of the layerObj, but it would be much nicer to have a bounds property or a getBounds() method to do this.
> It would be great to get this into PHP mapscript for v4.2 :D
> 

If anything is added, it should be a getBounds() or getExtents() method 
on the layerObj.  It can't be a property since setting this property all 
the time would require opening (and sometimes scanning) the file which 
can be slow sometimes.

Unfortunately it's too late for this in 4.2... even though that looks 
like a simple addition, it's this kind of "just one more last minute 
change" that introduces new issues and makes releases slip for weeks or 
months.

I would suggest that you file a enhancement bug about this, and remind 
us (via the bug) during the 4.3 release cycle.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-dev mailing list