[ms4w-users] get shape boundary !

Quang Nguyen tinquang at gmail.com
Thu Aug 23 04:17:29 EDT 2007


Hi,

I use PHP/Mapscript to show a path (from WKT string) on the map dynamically.
It worked (my path displayed correctly).

But I can't get the boundary of the path. The attributes of RectObj always
return -1.

This is my code:

 

$map = ms_newMapobj("test.map");

$layer = $map->getLayerByName("my_path");

$path = ms_shapeObjFromWkt("MULTILINESTRING((...))");        

$boundary = $path->bounds;

 

$minx = $boundary->minx; //always return -1

$miny = $boundary->miny ; //always return -1

$maxx = $boundary->maxx; //always return -1

$maxy = $boundary->maxy; //always return -1

 

 

$layer->addFeature($path);        

$layer->set('status', MS_ON);

$map->draw();

 

Can anybody help ?

Thanks

Quang

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20070823/a98aa763/attachment.html


More information about the ms4w-users mailing list