使用Google Maps API,如何获取地图显示区域角落的纬度和经度?
也就是说,如果我的地图宽300像素,高400像素,我怎样才能找到(0,0)和(300,400)点的纬度?
答案 0 :(得分:10)
答案 1 :(得分:1)
在 Android(Kotlin) 中你可以试试这个,
val curentScreen: LatLngBounds = mapview.getProjection().getVisibleRegion().latLngBounds
var northeast=curentScreen.northeast
var southwest=curentScreen.southwest
var center=curentScreen.center
Log.v("northeast LatLng","-:"+northeast)
Log.v("southwest LatLng","-:"+southwest)
Log.v("center LatLng","-:"+center)