0

I'm working on bounding a Mapbox map to only allow a specific geographic area to be displayed. I don't want the user to be able to pan or otherwise move outside the bounded area. I'm using the new GL library and I'm having trouble finding any documentation outside the api listing.

Does anyone know how to set a boundary in Mapbox GL Android?

Does anyone know if there is a User's Guide or similar help?

Thanks

Mitch

Mitch
  • 1,716
  • 3
  • 25
  • 41

1 Answers1

2

If you want to set the Map to a certain bounds you can use this CoordinateBounds example.

Note that there is currently still an issue with this, a workaround is found here.

If you want to disable Panning you can use mMapView.setScrollEnabled(false);

Tobrun
  • 18,291
  • 10
  • 66
  • 81