mapbox / mapbox/mapbox-maps-flutter
MapboxMap.style.getSource(id) returns null
@yunikkk is already working on this.
Since Mar 2, 2023.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
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
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.