Monday, May 14, 2012

How to convert Latitud and Longitud to Google GeoPoint?

How to convert Latitud and Longitud to Google GeoPoint?



My Latitud is: 47.523009954564536
My Long is : 19.01667991207027



And when i try to convert to GeoPoints with:



GeoPoint point = new GeoPoint((int)(latitude * 1e6),
(int)(longitude * 1e6));


the results are:
4.7523009E7
1.901671E7



Which is clearly wrong cause im not typing from the Gulf of Guinea (Africa)
I need values tarts with the 47 and 19 integers not 4. and 1. decimals.



I saw this kind of convertation in many pages but somehow its not good for me.
Help please !





No comments:

Post a Comment