[OpenLayers-Dev] inheritance with Geometry

Christopher Schmidt crschmidt at metacarta.com
Wed May 9 09:57:19 EDT 2007


On Wed, May 09, 2007 at 08:13:37AM +1000, Cameron Shorter wrote:
> However, I still have a problem accessing  some of the Geometry 
> functions from the Polygon class.
> Ie, when I call polygon.calculateBounds() I get the error:
> polygon.calculateBounds is not a function.

Does getBounds() work? Can you provide a small snippet of code which
reproduces this? I just tried, and failed to come up with a non-working
case... 

I tried vector-features.html, and ran:

>>> map.layers[1].features[2].geometry.getBounds()
left-bottom=(-112.82803652551843,44.67381052364127)
right-top=(-109.09974580388028,47.59095292854809)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list