fix(mobile): map crashes on Android (#10773)

Revert "fix(mobile): upgrade maplibre_gl package to fix issue with crash in ios7.4 above simulator (#10182)"

This reverts commit 99c6fdbc1c.
This commit is contained in:
Alex 2024-07-02 13:43:52 -05:00 committed by GitHub
parent 14d94df1b8
commit f23401d911
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 46 additions and 39 deletions

View file

@ -41,10 +41,10 @@ class MapThumbnail extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final offsettedCentre = LatLng(centre.latitude + 0.002, centre.longitude);
final controller = useRef<MapLibreMapController?>(null);
final controller = useRef<MaplibreMapController?>(null);
final position = useValueNotifier<Point<num>?>(null);
Future<void> onMapCreated(MapLibreMapController mapController) async {
Future<void> onMapCreated(MaplibreMapController mapController) async {
controller.value = mapController;
if (assetMarkerRemoteId != null) {
// The iOS impl returns wrong toScreenLocation without the delay
@ -73,7 +73,7 @@ class MapThumbnail extends HookConsumerWidget {
alignment: Alignment.center,
children: [
style.widgetWhen(
onData: (style) => MapLibreMap(
onData: (style) => MaplibreMap(
initialCameraPosition:
CameraPosition(target: offsettedCentre, zoom: zoom),
styleString: style,