[OpenMap Users] Radius error when editing an OMCircle

From: Jesper Berglund <jesper.berglund_at_pertexo.se>
Date: Tue, 26 Jul 2005 01:13:53 +0200

Hello Folks!

I am currently playing around with the editing stuff in OpenMap and I
ran into this.
I place an OMCircle on the map and creates it as this;

        OMCircle circle = new OMCircle( lat, lon, position.getRadius(),
Length.METER );

adds the circle to the layer and everything works perfectly.

I save the circle reference because I want to know the changes.

When the user has edited it I gather the data in a custom class and send
it to a server, but when I look at the radius it is not the correct
value. eg 400 meters become 0.0035 ... =(

I have traced it to when I ask for the radius on OMCircle ( OMArc ) it
converts the radians with Length.DECIMAL_DEGREE.fromRadians( float ) and
not the length unit I sent in. This calculation makes the radius almost
zero.

Is this a bug or am I using the classes wrong?

Should the getRadius method take a Length class to convert the rads to
the correct value??

Thanx!

-- 
Jesper Berglund
GUI Developer
Pertexo Systems AB 



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jul 25 2005 - 19:21:48 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT