geometryEngine shapePreservingAreaOfGeometry

600
2
03-05-2013 10:59 AM
WillCorum
New Contributor II
I've been porting code to the newest version of the api (10.1). It seems that geometryEngine shapePreservingAreaOfGeometry has changed in some way that throws an EXEC_BAD_ACCESS(code=2, address=0xf) error. This is both in my code and in the GeometrySample project I downloaded from the examples. Can anyone else confirm this so I can rule out my local installation of the api? If anyone else is seeing this, have you found a workaround?

Thanks,
Will
0 Kudos
2 Replies
WillCorum
New Contributor II
On a brand new machine with a fresh install of Xcode and the iOS runtime I get the same error in the measure sample when trying to measure area.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Hi Will,

We spoke yesterday at developer summit. In sample, enclose your shapePreservingAreaOfGeometry:sketchGeometry with [sketchGeometry isValid] and it won't crash.

if ([sketchGeometry isValid]) {      
        // Get the area of the current polygon
        _area = [geometryEngine shapePreservingAreaOfGeometry:sketchGeometry inUnit:_areaUnit];
}

We'll fix the sample.

Regards,
Nimesh
0 Kudos