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

Daniel Morissette morissette at dmsolutions.ca
Wed Dec 10 08:13:58 PST 2003


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 at 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





More information about the MapServer-users mailing list