[Mapserver-users] Question about PHP/Mapscript.

Eric Bridger eric at gomoos.org
Mon Jun 2 06:18:49 EDT 2003


Both the shape and shapefile objects contain a bounds member which is a
rectangle object. So just use something like:
$map->{extent}->{minx} = $shapefile->{bounds}->{minx};
$map->{extent}->{miny} = $shapefile->{bounds}->{miny};
$map->{extent}->{maxx} = $shapefile->{bounds}->{maxx};
$map->{extent}->{maxy} = $shapefile->{bounds}->{maxy};

Eric

On Mon, 2003-06-02 at 11:15, braulioen at ono.com wrote:
> Hi!
> 
> How I could center a polygon of a shapefile in a map in 
> PHP/Mapscript?, that is to say, to fit the extent of the map to which 
> he occupies the polygon.
> 
> Thanks.
> Braulio.
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 





More information about the mapserver-users mailing list