mapbox / mapbox/mapbox-maps-flutter

Unable to establish connection on channel: "dev.flutter.pigeon.mapbox_maps_flutter._PointAnnotationMessenger.createMulti

Offen
#734 6 Kommentare 4 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Dart
Sterne
380
Forks
204
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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)

Future<void> generateCarPinMapBox() async {
    if (mapboxMapController == null || pointAnnotationManager == null) {
      // You may want to add some retry logic or error handling here in case it's null
      print("Mapbox controller or annotation manager is not ready yet.");
      return;
    }

    var pointAnnotationList = <mapbox.PointAnnotationOptions>[];
    for (var car in cars) {
      if (car.isAvailable! && !car.isRiding! && car.inversQNR == "ARISTEST") {
        continue;
      } else if (car.isAvailable! && !car.isRiding!) {
        final ByteData bytes = await rootBundle.load(Get.isDarkMode ? carooPinDark : carooPinLight);
        final Uint8List imageData = bytes.buffer.asUint8List();
        // pointAnnotationManager?.create(mapbox.PointAnnotationOptions(geometry: mapbox.Point(coordinates: mapbox.Position(car.latitude as num, car.longitude as num)), image: imageData, iconSize: 1.0,));
        final annotation =  mapbox.PointAnnotationOptions(geometry: mapbox.Point(coordinates: mapbox.Position(car.latitude as num, car.longitude as num)), image: imageData, iconSize: 3.0,);
        pointAnnotationList.add(annotation);
      }
    }
    await pointAnnotationManager?.createMulti(pointAnnotationList);
  }

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die PlatformException an der Stelle pointAnnotationManager?.createMulti(pointAnnotationList) mithilfe des bereitgestellten generateCarPinMapBox-Beispiels zu reproduzieren. Untersuche den platform-channel-Einstiegspunkt von createMulti und dessen Einrichtung, um festzustellen, warum der Channel nicht eingerichtet werden kann; abgeschlossen ist die Aufgabe, wenn der Aufruf ohne die channel-error-Ausnahme abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart, flutter
Bereich
mobile
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.