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
Retrieve the source attribution.
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).
Retrieve current maximum overscale factor for parent tiles.
Retrieve the minimum tile update interval, which is used to throttle the tile update network requests.
Retrieve current pre-fetching zoom delta.
Retrieve whether or not the fetched tiles for the given source should be stored in the local cache
Queries the source for features.
Updates the GeoJson. The update is performed asynchronously, so 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 asynchronously, so 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 asynchronously, so the data won't be immediately visible or available to query when this method returns.
When a set of tiles for a current zoom level is being rendered and some of the ideal tiles that cover the screen are not yet loaded, parent tile could be used instead. This might introduce unwanted rendering side-effects, especially for raster tiles that are overscaled multiple times. This method sets the maximum limit for how much a parent tile can be overscaled.
Sets the minimum tile update interval, which is used to throttle the tile update network requests.
Set the tile pre-fetching zoom delta for current source. Pre-fetching makes sure that a low-resolution tile at the (current_zoom_level - delta) is rendered as soon as possible at the expense of a little bandwidth. If delta has not been set or set to null, it will use the value in MapLibreMap instance.
Set a flag defining whether or not the fetched tiles for the given source should be stored in the local cache