-2

我有 2 个双打,纬度和经度,形式为 (X.XXXXXX)。我正在尝试从此值创建新的 GeoPoint,但是当我转换为 GeoPoint 时,删除,获取此结果geopoint(XXXX,XXXX);

Double latitudEditando = Double.parseDouble(datosLugar.get(4).toString());  
Double longitudEditando = Double.parseDouble(datosLugar.get(5).toString());   
puntoEditando = new GeoPoint((int)(latitudEditando*1e6), (int)(longitudEditando*1e6));

我究竟做错了什么?

datosLugar.get(4) return me: 40.3138987 (Double) 
datosLugar.get(5) return me: -3.8811184 (double)
 puntoEditando return me (403138987,-38811184)

抱歉,没关系,我认为 geopoint 有 (40,00000 , 44,000)

4

1 回答 1

0

GeoPoint来自 google 插件的类以int. 这很好,只要latitudEditando并且longitudEditando是以度数表示坐标的双精度数:

new GeoPoint((int)(latitudEditando*1e6), (int)(longitudEditando*1e6));
于 2012-01-08T00:52:57.723 回答