I have a Polyline that I draw on the map and I would like to get its distance in meters.
right now it's not working, basically what I have is
distanceSeg=new Polyline();
double len1=distanceSeg.calculateLength2D();
double m_len=
Unit.convertUnits(len1,Unit.create(AngularUnit.Code.DEGREE),Unit.create(LinearUnit.Code.METER));
The call to Unit.convertUnits throws a GeometryException with "invalid_call".
Any ideas?