Hello,
I have a JSON Object with a latitude and longitude String on which I
get the values doing this:
String latitude = picInfo.getString("latitude");
String longitude = picInfo.getString("longitude");
Then I convert them to floats like this:
float latInt = Float.valueOf(latitude).floatValue();
float longInt = Float.valueOf(longitude).floatValue();
And place them on a GeoPoint like this:
GeoPoint X = new GeoPoint((int) (latInt*1E6),(int) (longInt*1E6) );
Debugging this values I can see JAVA approximates the values, is there
anyway to keep them exactly the same?
In my example:
String latitude = 32.649162
String longitude = -16.907325
float latInt = 32.649162
float longInt = -16.907326
GeoPoint X = 32649162,-16907325
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en