[mapserver-users] Re: Mapscript

Daniel Morissette morissette at dmsolutions.ca
Thu Jan 10 15:03:27 PST 2002


Joseph Archibald wrote:
> 
> Can you query a layer and get a bounding box back?
> 
> I need to zoom the map after a sql query.  I am currently doing this from
> opening a shape file, finding the record and getting the bounding box of
> that record.  Calculate the center point and zoomscale on that point.
> 
> I am using mapinfo .tab files and don't want to convert the tab to
> shapefiles after getting new .tab files.
> 

You can use the new layerObj methods open()/close() and getShape() to do
the equivalent of what you used to do with shapefiles to read the
bounding box of selected shapes.  These new methods will work with any
data source supported by MapServer and not just shapefiles. 

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the MapServer-users mailing list