addGeoJson method

Future<void> addGeoJson(
  1. String sourceId,
  2. Map<String, dynamic> geoJson
)

Adds a GeoJSON source to the map.

Implementation

Future<void> addGeoJson(String sourceId, Map<String, dynamic> geoJson) async {
  _geoJsonCache[sourceId] = geoJson;
  await mapController.addSource(
    sourceId,
    GeojsonSourceProperties(data: geoJson),
  );
}