Open MarsTheMan opened 1 month ago
Hello @MarsTheMan,
Thank you for reaching out. I’m unable to reproduce the issue on my side. Could you please provide more details about your environment and setup? Specifically:
This information would help us investigate further. Thank you!
@evil159 I am also getting logs of a similar error on my crash reporting tool:
PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.mapbox_maps_flutter._PointAnnotationMessenger.update"., null, null)
This happens when I am doing:
PointAnnotationManager.update(PointAnnotation);
Here are the answers to your questions:
The version of the Mapbox SDK you’re using.
The platform (iOS/Android) where this issue occurs.
Any specific steps or conditions to replicate the issue.
@evil159 We've also received similar crash reports on these methods as well:
MapboxMap.flyTo
PointAnnotationManager.setIconRotationAlignment
PointAnnotationManager.setIconAllowOverlap
PointAnnotationManager.create
I have a similar issue with streaming data from firestore to use for the marker and polyline annotations. Code is a little long to include everything but will try and do a sudo code synopsis of what Im doing:
Map screen listens to a riverpod stream provider in the build method:
`
ref.listen<AsyncValue<List
// Update polylines
await timelineMapController.drawBreadcrumbPolylines(
breadcrumbs,
polylineAnnotationManager!,
);
}
},
loading: () {
// Optionally handle loading state
debugPrint('Breadcrumbs are loading...');
},
error: (error, stack) {
// Optionally handle error state
debugPrint('Error in mapCrumbsProvider: $error');
},
);
});
`
Here is my MapWidget
` mapbox.MapWidget( onMapCreated: (mapbox.MapboxMap mapboxMap) async { debugPrint('Map created!'); // assign controller to widget // Assign controller to widget mapController = mapboxMap;
// Configure map settings
mapController?.location.updateSettings(
mapbox.LocationComponentSettings(
enabled: true,
),
);
mapController?.compass.updateSettings(
mapbox.CompassSettings(
enabled: false,
),
);
mapController?.scaleBar.updateSettings(
mapbox.ScaleBarSettings(
enabled: false,
),
);
mapController?.gestures.updateSettings(
mapbox.GesturesSettings(
rotateEnabled: false,
),
);
// Initialize Annotation Managers once
pointAnnotationManager ??= await mapController!
.annotations
.createPointAnnotationManager();
polylineAnnotationManager ??= await mapController!
.annotations
.createPolylineAnnotationManager();
activityPointAnnotationManager ??= await mapController!
.annotations
.createPointAnnotationManager();
activityPolylineAnnotationManager ??= await mapController!
.annotations
.createPolylineAnnotationManager();
// Add Breadcrumb Annotations
timelineMapController.addBreadcrumbAnnotations(
breadcrumbs,
pointAnnotationManager!,
);
// Draw Polylines
timelineMapController.drawBreadcrumbPolylines(
breadcrumbs,
polylineAnnotationManager!,
);
// Listen to annotation taps
pointAnnotationManager!.addOnPointAnnotationClickListener(
BreadcrumbPointAnnotationClickListener(
timelineMapController.annotationToBreadcrumbMap,
(Breadcrumb crumb) {
timelineMapController.setBreadcrumb(crumb);
},
),
);
// Initialize map location after setting up the map
timelineMapController.initializeMapLocation(
breadcrumbs,
mapController!,
currentLocationAsync.value,
);
},
),
`
The annotation managers are state variables. Ive tried so many things and really just looking for a workaround at this point
hey @evil159 , any updates on this?
Hello. When await pointAnnotationManager?.createMulti(pointAnnotationList) is executed, I get the following error: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.mapbox_maps_flutter._PointAnnotationMessenger.createMulti"., null, null)