[Mapserver-users] Calculate bounds of a ShapeObj with PHP Mapscript

Daniel Morissette morissette@dmsolutions.ca
Wed, 10 Dec 2003 11:13:58 -0500


This setBounds() function must be fairly new in Perl MapScript and was 
never ported to PHP MapScript. You should probably file a bug about this.

Daniel

mapserver@geochem.de wrote:
> Dear List,
> 
> I am using a function which creates Polygon Shape Objects with PHP
> Mapscript (Mapserver 4.0.1).
> 
> $shpobj = ms_newShapeObj(MS_SHAPE_POLYGON);
> $lineobj = ms_newLineObj();
> foreach ($geok as $werte) {
> 	$lineobj -> addxy ($werte['x'], $werte['y']
> }
> $shpobj -> set ("text", $bez);
> $shpobj -> add ($lineobj);
> print_r($shpobj);
> 
> Unfortunately the bounds of the shapeObj are set to
> [bounds] => ms_rect_obj Object
>         (
>             [_handle_] => Resource id #58
>             [minx] => -1
>             [miny] => -1
>             [maxx] => -1
>             [maxy] => -1
>         ) 
> 
> Perl Mapscript allows to call 
> $shpobj->setBounds();
> to calculate the bounds belated.
> 
> Do a similar function also exists in PHP Mapscript?
> 
> Many thanks
> Nicol


_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users