[OpenLayers-Dev] inheritance with Geometry

Cameron Shorter cameron.shorter at gmail.com
Wed May 9 22:52:04 EDT 2007


Thanks Chris,
I see where the problem is now.

I was calling polygon.calculateBounds() instead of 
polygon.geometry.calculateBounds().

Christopher Schmidt wrote:
> 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,
>   


-- 
Cameron Shorter
Systems Architect, http://lisasoft.com.au
Tel: +61 (0)2 8570 5050
Mob: +61 (0)419 142 254




More information about the Dev mailing list