[OpenLayers-Users] Get bounds from each polygon in a multipolygon?

Christopher Schmidt crschmidt at metacarta.com
Thu Sep 4 16:44:55 EDT 2008


On Thu, Sep 04, 2008 at 01:32:32PM -0700, Zer wrote:
> Using a vector feature layer, is there a way to get the bounds from each
> polygon in a multipolyon? 

Yes.

> Or a way to get the cenroid?

Yes.

(feature.geometry, geometry.components, geometry.getBounds(),
bounds.getCenterLonLat() are all your friends.)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list