0

I have offline map implemented on GoogleMap (tilesOverly) Everything working fine just the problem is i can scroll outside the offline map.

How i can close the map to BoundBox like in osmdroid scrollAreaLimit?

1 Answer 1

2

I think the best way currently available to us is to have OnCameraChangeListener, where you check if CameraPosition.target is outside of your defined LatLngBounds and doing GoogleMap.animateCamera to a position inside the bounds.

See this video for how it behaves: http://www.youtube.com/watch?v=-nCZ37HdheY

Sign up to request clarification or add additional context in comments.

2 Comments

Thx, this is what i try but little ugly because i can see the gray place :)
@Sherad The video shows white tiles outside. I suggest choosing some color for your app and doing the same. I guess users will tend to try to counter your limitation, but not for too long. Panning the map and seeing to goes back is fun, but not longer than few minutes.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.