mapbox / mapbox/mapbox-maps-flutter

MapboxMap.style.getSource(id) returns null

Offen
#48 12 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@yunikkk arbeitet bereits daran.

Seit 02.3.2023.

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

Beschreibung

Why is this printing null to the console?

```
await mapboxMap?.style.addStyleSource(
"chargers",
json.encode({
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"id": "39169",
"type": "Feature",
"properties": {
"fastCharger": false,
"powerKW": "22 KW",
"name": "Rathaus Altona"
},
"geometry": {
"type": "Point",
"coordinates": [9.93550387483399, 53.5464387674623]
}
},
]
},
"cluster": true,
"clusterMaxZoom": 14,
"clusterRadius": 50
}));

final GeoJsonSource source =
await mapboxMap.?.style.getSource("chargers") as GeoJsonSource;

print(await source.data); ==> null
```

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.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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