mapbox-maps-android icon indicating copy to clipboard operation
mapbox-maps-android copied to clipboard

setBounds(cameraBoundsOptions) causes map hide

Open bartek977 opened this issue 3 years ago • 0 comments

Environment

  • Android OS version: Android 11
  • Devices affected: Samsung Galaxy Tab A8
  • Maps SDK Version: 10.6.1

Observed behavior and steps to reproduce

When I set bounds with a small area, the map hides.

Example:

mapView?.getMapboxMap()?.addOnMapClickListener {
            mapView?.getMapboxMap()?.setBounds(
                CameraBoundsOptions.Builder()
                    .bounds(CoordinateBounds(
                        Point.fromLngLat(4.000001,52.0000022),
                        Point.fromLngLat(4.000002,52.0000025)
                    ))
                    .build()
            )
            true
        }

Expected behavior

the map shouldn't hide, but maybe increase the bounding box area if it's too small

bartek977 avatar Oct 19 '22 12:10 bartek977