Commit 0092ac8e authored by Qiu Xiang's avatar Qiu Xiang

修正 setLimitRegion LatLngBounds 计算错误

parent dd480009
...@@ -216,8 +216,8 @@ class AMapView(context: Context) : MapView(context) { ...@@ -216,8 +216,8 @@ class AMapView(context: Context) : MapView(context) {
val latitudeDelta = limitRegion.getDouble("latitudeDelta") val latitudeDelta = limitRegion.getDouble("latitudeDelta")
val longitudeDelta = limitRegion.getDouble("longitudeDelta") val longitudeDelta = limitRegion.getDouble("longitudeDelta")
map.setMapStatusLimits(LatLngBounds( map.setMapStatusLimits(LatLngBounds(
LatLng(latitude - latitudeDelta, longitude - longitudeDelta), LatLng(latitude - latitudeDelta / 2, longitude - longitudeDelta / 2),
LatLng(latitude + latitudeDelta, longitude + longitudeDelta) LatLng(latitude + latitudeDelta / 2, longitude + longitudeDelta / 2)
)) ))
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment