我想指出,使用复用一个谷歌地图上的位置。为此目的,纬度和经度值将被分配给一个的GeoPoint,但它仅接受的int值
I want to point to a Google map location using overlay. For this purpose latitude and longitude values will be assigned to a GeoPoint, but it only accepts int values.
我如何能为它分配一个双精度值?还是有另一种解决办法指向一个确切的位置?
How can I assign it a double value? Or is there another solution to point to an exact location?
point = new GeoPoint((int)t.getLati(),(int)t.getLongi())
任何帮助将是AP preciated。
Any help would be appreciated.
由于GeoPoint接受经度和纬度在microdegrees,只需创建你的观点,像这样:
Since GeoPoint accepts latitudes and longitudes in microdegrees, simply create your point like so:
GeoPoint point = new GeoPoint((int)(latitude * 1e6),
(int)(longitude * 1e6));