It is necessary to make sure that a certain area (from such and such latitude, from such and such to such longitude) is displayed on Google maps for android, and the rest of the world map cannot be viewed.

Is there such functionality out of the box or should it be done somehow via OnCameraChangeListener for example?

If someone came across this, how is it easiest to implement?

    1 answer 1

    The easiest way is to track the position of the camera through the Listener, and if the coordinates get out of the available limits, then assign the nearest ones to them, i.e. move the camera there, so the user will be able to crawl a little beyond the border of the selected area, but will immediately be transferred back to the area.