谷歌地图获取(可视)边界区域,东北角和西南角的坐标
作者:
Pino | 来源:发表于
2019-02-25 11:54 被阅读0次try {
LatLngBounds curScreen = gmap.getProjection()
.getVisibleRegion().latLngBounds;
System.out.println(curScreen.toString());
//top-left corner
double topleftlatitude=curScreen.northeast.latitude;
double topleftlongitude=curScreen.southwest.longitude;
System.out.println("top left==>"+topleftlatitude+"" +topleftlongitude);
//bottom-right corner
double bottomrightlatitude=curScreen.southwest.latitude;
double bottomrightlongitude=curScreen.northeast.longitude;
System.out.println("bottom right==>"+bottomrightlatitude+"" +bottomrightlongitude);
} catch (Exception e) {
e.printStackTrace();
}
本文标题:谷歌地图获取(可视)边界区域,东北角和西南角的坐标
本文链接:https://www.haomeiwen.com/subject/mciwyqtx.html
网友评论