[mapserver-users] q. combining mapscript and PostGIS

Alex Rice alex_rice at arc.to
Tue Aug 13 12:38:24 EDT 2002


(Alex, answering own post)

This was covered on the Postgis mailing list. The answer is yes, 
you have to find the extent by other means, like by DBI query, 
then set the extent into your map object using mapscript.


On Monday, August 12, 2002, at 06:02  PM, Alex Rice wrote:

> Hi, I am using Perl mapscript. I am wondering if there are any 
> other ways to manipulate the extent of the map object, other than 
> by directly accessing mapobject's rectobject. Like via a layer's 
> filter somehow?
>
> I am querying postgis tables for street objects and school 
> district objects. I want to zoom the map object's extent to match 
> the bounding box of search results. I think the postgis query for 
> the bounding box would be like:
>
> # select Extent(the_geom) from cityplus where stanno like '%LOMAS 
> BLVD%';
> BOX3D(-106.670434 35.086152 0,-106.487795 35.094625 0)
> (1 row)
>
> I know I could open a DBI connection, do another query, and then 
> setting the extent on the mapobject's rectobj. But I don't want 
> to use DBI unless necessary.




More information about the mapserver-users mailing list