GeoJsonSource class final Style

A GeoJSON source. Data must be provided via a "data" property, whose value can be a URL or inline GeoJSON. When using in a browser, the GeoJSON data must be on the same domain as the map or served with CORS headers.

https://maplibre.org/maplibre-style-spec/sources/#geojson

Inheritance

Constructors

GeoJsonSource({required String id, required String data, double maxZoom = 18, String? attribution, bool cluster = false, int clusterRadius = 50, int? clusterMaxZoom, Map<String, List<Object>>? clusterProperties})
The default constructor for a GeoJsonSource object.
const

Properties

attribution String?
Contains an attribution to be displayed when the map is shown to a user.
final
cluster bool
If true, GeoJSON point features will be clustered together. The radius of each cluster is specified by clusterRadius. The maximum zoom level at which to cluster points is specified by clusterMaxZoom.
final
clusterMaxZoom int?
The maximum zoom level at which to cluster points if clustering is enabled. Defaults to one zoom level less than maxZoom so that, at the maximum zoom level, the shapes are not clustered.
final
clusterProperties Map<String, List<Object>>?
Properties to aggregate from clustered points. The key is the property name, and the value is a list of two expressions:
final
clusterRadius int
The radius of each cluster if clustering is enabled. A value of 512 produces a radius equal to the width of a tile.
final
data String
A URL to a GeoJSON file, or GeoJSON string.
final
hashCode int
The hash code for this object.
no setterinherited
id String
The id of the source.
finalinherited
maxZoom double
Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited