开发者

How to get diagonal co-ordinates for Google map view in android

In my android app, I am displaying a Google map for diff locations for which I have their lat & long. But now I am required to get diagonal co-ordinates i.e. ne_lat,ne_long,sw_lat and sw_long and display the v开发者_Python百科iew on map based on this. How to achieve this ? Please help.


GoogleMap map = // get reference to google map instance

if(map != null){
       LatLngBounds visibleBounds = map.getProjection().getVisibleRegion().latLngBounds;

       Log.i("SW", visibleBounds.southwest.toString());
       Log.i("NE", visibleBounds.northeast.toString());
}

Hope that helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜