encoding property

Future<Encoding?> get encoding

The encoding used by this source. Mapbox Terrain RGB is used by default Default value: "mapbox".

Implementation

Future<Encoding?> get encoding async {
  final localStyle = style;
  if (localStyle == null) return null;
  final raw = (await localStyle.getStyleSourceProperty(id, "encoding")).value;
  if (raw == null) return null;
  return Encoding.values.firstWhere(
    (e) => e.toString().split('.').last.toLowerCase().contains(raw as String),
  );
}