DataSourceOptions interface
A data source for managing shape data that will be displayed on the map.
A data source must be added to a layer before it is visible on the map.
Options for a DataSourceOptions
.
- Extends
Properties
buffer | The size of the buffer around each tile.
A buffer value of 0 will provide better performance but will be more likely to generate artifacts when rendering.
Larger buffers will produce left artifacts but will result in slower performance.
default |
cluster | A boolean indicating if Point features in the source should be clustered or not.
If set to true, points will be clustered together into groups by radius.
default |
cluster |
The maximum zoom level in which to cluster points.
Defaults to one zoom less than |
cluster |
Defines custom properties that are calculated using expressions against all the points within each cluster and added to the properties of each cluster point. |
cluster |
The radius of each cluster in pixels.
default |
line |
Specifies whether to calculate line distance metrics.
This is required for line layers that specify |
max |
Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).
default |
tolerance | The Douglas-Peucker simplification tolerance that is applied to the data when rendering (higher means simpler geometries and faster performance).
default |
Property Details
buffer
The size of the buffer around each tile.
A buffer value of 0 will provide better performance but will be more likely to generate artifacts when rendering.
Larger buffers will produce left artifacts but will result in slower performance.
default 128
buffer?: number
Property Value
cluster
A boolean indicating if Point features in the source should be clustered or not.
If set to true, points will be clustered together into groups by radius.
default false
cluster?: boolean
Property Value
clusterMaxZoom
The maximum zoom level in which to cluster points.
Defaults to one zoom less than maxZoom
so that last zoom features are not clustered.
clusterMaxZoom?: number
Property Value
clusterProperties
Defines custom properties that are calculated using expressions against all the points within each cluster and added to the properties of each cluster point.
clusterProperties?: Record<string, AggregateExpression>
Property Value
clusterRadius
The radius of each cluster in pixels.
default 50
clusterRadius?: number
Property Value
lineMetrics
Specifies whether to calculate line distance metrics.
This is required for line layers that specify lineGradient
values.
default false
lineMetrics?: boolean
Property Value
maxZoom
Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).
default 18
maxZoom?: number
Property Value
tolerance
The Douglas-Peucker simplification tolerance that is applied to the data when rendering (higher means simpler geometries and faster performance).
default 0.375
tolerance?: number