data property

Future<String?> get data

The URL this source loads its GeoJSON from.

Returns null if you passed inline GeoJSON. The map does not keep a copy of inline data, so keep your own copy if you need it later. To read the features back from the map, use MapboxMap.querySourceFeatures or MapboxMap.queryRenderedFeatures.

Implementation

Future<String?> get data async {
  final localStyle = style;
  if (localStyle == null) return null;
  final raw = (await localStyle.getStyleSourceProperty(id, "data")).value;
  if (raw == null) return null;
  return raw as String;
}