Consider I have the LatLng of location A in the map. how can I get the Latlng of B and C position on the map? I want to get the bounds of the red box.
EDIT: I want to get the bound of this box and limit the camera to that bound, so user can not change the camera and go outside this bound
The code I posted in this answer: MKCoordinateRegionMakeWithDistance equivalent in Android will get bounds for you.
Usage:
This answers your original question about getting bounds. You can also get point B and C from bounds easily.
Now the problem is you cannot restrict user panning with the current API. You may try to use
onCameraChange
to detect when you are outside and force it back, but that won't give any good user experience in my opinion.I think you are better of moving camera to this bounds only once and giving them free hand to swipe to Africa anytime they want. In the end they will use app functionality, which is in your bounds.