GeoJSONSourceSpecification
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.
Properties
Contains an attribution to be displayed when map is shown to a user.
Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means clusters will be displayed until z15.
Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to 2.
An object defining custom properties on generated clusters if clustering is enabled, aggregating values from clustered points. Has form {"property_name": [operator, map_expression]}. operator is any expression function that accepts at least 2 operands (e.g. "+" or "max") — it accumulates the property value from clusters/points the cluster contains; map_expression produces the value of a single point.
Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to width of a tile. Defaults to 50.
A URL to a GeoJSON file, or inline GeoJSON.
An expression for filtering features prior to processing them for rendering.
Whether to generate ids for the geojson features. When enabled, feature.id property will be auto assigned based on its index in features array, over-writing any previous values.
Whether to calculate line distance metrics. Required for line layers with gradient.
A property to use as a feature id (for feature state). Either a property name, or an object of form {<sourceLayer>: <propertyName>}.