[Mapserver-users] Calculate bounds of a ShapeObj with PHP Mapscript
mapserver at geochem.de
mapserver at geochem.de
Wed Dec 10 07:38:04 PST 2003
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