Geo Json Source
GeoJson source, allows using FeatureCollections from Json.
See also
Constructors
Create an empty GeoJsonSource
Create an empty GeoJsonSource with non-default GeoJsonOptions.
Create a GeoJsonSource from a raw json string
Create a GeoJsonSource from a raw json string and non-default GeoJsonOptions
Create a GeoJsonSource from a remote geo json file
Create a GeoJsonSource from a remote geo json file and non-default GeoJsonOptions
Create a GeoJsonSource from a geo json URI
Create a GeoJsonSource from a geo json URI and non-default GeoJsonOptions
Create a GeoJsonSource from a FeatureCollection.
Create a GeoJsonSource from a FeatureCollection and non-default GeoJsonOptions.
Create a GeoJsonSource from a Feature
Create a GeoJsonSource from a Feature and non-default GeoJsonOptions
Create a GeoJsonSource from a Geometry
Create a GeoJsonSource from a Geometry and non-default GeoJsonOptions
Properties
Functions
Returns the children of a cluster (on the next zoom level) given its id (cluster_id value from feature properties).
Returns the zoom on which the cluster expands into several children (useful for "click to zoom" feature) given the cluster's cluster_id (cluster_id value from feature properties).
Returns all the leaves of a cluster (given its cluster_id), with pagination support: limit is the number of leaves to return (set to Infinity for all points), and offset is the amount of points to skip (for pagination).
Gets the current state of a feature in this source.
Queries the source for features.
Removes all state from a single feature in this source.
Removes state from a feature in this source, or from all features when featureId is null.
Removes all feature state entries from this source.
Sets the state of a feature in this source.
Updates the GeoJson. The update is performed synchronously or asynchronously, based on the source synchronous update flag. In the case of asynchronous updates, the data won't be immediately visible or available to query when this method returns.
Updates the GeoJson with a single feature. The update is performed synchronously or asynchronously, based on the source synchronous update flag. In the case of asynchronous updates, the data won't be immediately visible or available to query when this method returns.
Updates the GeoJson with a single geometry. The update is performed synchronously or asynchronously, based on the source synchronous update flag. In the case of asynchronous updates, the data won't be immediately visible or available to query when this method returns.