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
185 stars 106 forks source link

[BUG] await update location tracking mode #429

Open XanderD99 opened 1 month ago

XanderD99 commented 1 month ago

Platforms

all

Version of flutter maplibre_gl

0.19.0

Bug Description

updateUserTracking has an animation in the native versions (not sure about web). These animation can be listened to but this is not the case in the library at the moment.

Steps to Reproduce

call updateTracking mode with await. do something with camera after that.

Expected Results

function returns after animation is finished

Actual Results

function returns instantly, and because I want to zoom in after that it stops the animation that is moving to my location

Code Sample

await _mapController?.updateMyLocationTrackingMode(
  MyLocationTrackingMode.TrackingGPS,
);

final cameraUpdate = CameraUpdate.zoomTo(16);
await _mapController?.moveCamera(cameraUpdate);