flutter-mapbox-gl / maps

A Mapbox GL flutter package for creating custom maps
Other
1.04k stars 503 forks source link

getVisibleRegion call fails after changing bearing #1231

Closed sqcsabbey closed 1 year ago

sqcsabbey commented 1 year ago

On Android, if I call _mapboxController.animateCamera(CameraUpdate.bearingTo(bearing));, the map rotates as expected, but then subsequent calls to await _mapboxController.getVisibleRegion() give me the error:

E/flutter (13351): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:mapbox_gl_platform_interface/src/location.dart': Failed assertion: line 69 pos 16: 'southwest.latitude <= northeast.latitude': is not true.
E/flutter (13351): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
E/flutter (13351): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
E/flutter (13351): #2      new LatLngBounds (package:mapbox_gl_platform_interface/src/location.dart:69:16)
E/flutter (13351): #3      MethodChannelMapboxGl.getVisibleRegion (package:mapbox_gl_platform_interface/src/method_channel_mapbox_gl.dart:538:14)
E/flutter (13351): <asynchronous suspension>
E/flutter (13351): #4      MapProjectController.addPoint (package:survey/controllers/map_project.dart:190:20)
E/flutter (13351): <asynchronous suspension>
E/flutter (13351): #5      MapView._dropMarkerButton.<anonymous closure>.<anonymous closure> (package:survey/views/map/map.dart:523:27)
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

fly-qp commented 1 year ago

This issue is still there