开发者

Give double value to Geopoint in GoogleMap overlays

I want to point to a Google map location usi开发者_JS百科ng 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()) 

Any help would be appreciated.


Since GeoPoint accepts latitudes and longitudes in microdegrees, simply create your point like so:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜