GeojsonSourceProperties class

Implemented types

Constructors

GeojsonSourceProperties({Object? data, double? maxzoom = 18, String? attribution, double? buffer = 128, double? tolerance = 0.375, bool? cluster = false, double? clusterRadius = 50, double? clusterMaxZoom, Object? clusterProperties, bool? lineMetrics = false, bool? generateId = false, String? promoteId})
const
GeojsonSourceProperties.fromJson(Map<String, dynamic> json)
factory

Properties

attribution String?
Contains an attribution to be displayed when the map is shown to a user.
final
buffer double?
Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance.
final
cluster bool?
If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new Point features in the source with additional properties:
final
clusterMaxZoom double?
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).
final
clusterProperties Object?
An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the 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.Example: {"sum": ["+", ["get", "scalerank"]]}.For more advanced use cases, in place of operator, you can use a custom reduce expression that references a special ["accumulated"] value, e.g.:{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}
final
clusterRadius double?
Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.
final
data Object?
A URL to a GeoJSON file, or inline GeoJSON.
final
generateId bool?
Whether to generate ids for the geojson features. When enabled, the feature.id property will be auto assigned based on its index in the features array, over-writing any previous values.
final
hashCode int
The hash code for this object.
no setterinherited
lineMetrics bool?
Whether to calculate line distance metrics. This is required for line layers that specify line-gradient values.
final
maxzoom double?
Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).
final
promoteId String?
A property to use as a feature id (for feature state). Either a property name, or an object of the form {<sourceLayer>: <propertyName>}.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tolerance double?
Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).
final

Methods

copyWith(Object? data, double? maxzoom, String? attribution, double? buffer, double? tolerance, bool? cluster, double? clusterRadius, double? clusterMaxZoom, Object? clusterProperties, bool? lineMetrics, bool? generateId, String? promoteId) GeojsonSourceProperties
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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