maplibre / flutter-maplibre-gl

Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
https://pub.dev/packages/maplibre_gl
Other
226 stars 125 forks source link

Error when getting visible region from controller #234

Open noorbakerally opened 1 year ago

noorbakerally commented 1 year ago

I am getting the following error when executing the line LatLngBounds latLngBounds = await maplibreMapController.getVisibleRegion();

southwest.latitude <= northeast.latitude

#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      new LatLngBounds (package:maplibre_gl_platform_interface/src/location.dart:73:16)
#3      MethodChannelMaplibreGl.getVisibleRegion (package:maplibre_gl_platform_interface/src/method_channel_mapbox_gl.dart:346:14)
<asynchronous suspension>
#4      Navigation.turnNavOff (package:app/app/pages/Map/MapLibreWidget/Extensions/Navigation/RouteNavigation.dart:200:33)
<asynchronous suspension>
m0nac0 commented 1 year ago

@noorbakerally Are you still seeing this issue? If yes, what region of the earth is visible when you get that error? I assume it may be related to the meridian / antimeridian