[mapserver-users] Re: Mapscript

Jim Burnett jimburnett at ntelos.net
Fri Jan 11 08:49:50 EST 2002


I've been looking into using getShap(), but doesnt it require the index of
the shape? Not all databases will have this Index. I think you can get the
shap via a class, but the shapeObj doesnt seem to work correctly. Do you
have any sample code for drawing a shape, getting the shape by class, not by
the shape index?


-jim-

----- Original Message -----
From: "Daniel Morissette" <morissette at dmsolutions.ca>
To: "Joseph Archibald" <joea at archtech.ca>
Cc: "mapserver-users" <mapserver-users at lists.gis.umn.edu>
Sent: Thursday, January 10, 2002 6:03 PM
Subject: [mapserver-users] Re: Mapscript


> 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