ModelLayer class

A 3D model

Inheritance

Constructors

ModelLayer({required String id, Visibility? visibility, List<Object>? visibilityExpression, List<Object>? filter, double? minZoom, double? maxZoom, String? slot, required String sourceId, String? sourceLayer, bool? modelAllowDensityReduction, List<Object>? modelAllowDensityReductionExpression, String? modelId, List<Object>? modelIdExpression, double? modelAmbientOcclusionIntensity, List<Object>? modelAmbientOcclusionIntensityExpression, bool? modelCastShadows, List<Object>? modelCastShadowsExpression, int? modelColor, List<Object>? modelColorExpression, double? modelColorMixIntensity, List<Object>? modelColorMixIntensityExpression, double? modelCutoffFadeRange, List<Object>? modelCutoffFadeRangeExpression, ModelElevationReference? modelElevationReference, List<Object>? modelElevationReferenceExpression, double? modelEmissiveStrength, List<Object>? modelEmissiveStrengthExpression, List<double?>? modelHeightBasedEmissiveStrengthMultiplier, List<Object>? modelHeightBasedEmissiveStrengthMultiplierExpression, double? modelOpacity, List<Object>? modelOpacityExpression, bool? modelReceiveShadows, List<Object>? modelReceiveShadowsExpression, List<double?>? modelRotation, List<Object>? modelRotationExpression, double? modelRoughness, List<Object>? modelRoughnessExpression, List<double?>? modelScale, List<Object>? modelScaleExpression, ModelScaleMode? modelScaleMode, List<Object>? modelScaleModeExpression, List<double?>? modelTranslation, List<Object>? modelTranslationExpression, ModelType? modelType, List<Object>? modelTypeExpression})

Properties

filter ↔ List<Object>?
An expression specifying conditions on source features. Only features that match the filter are displayed.
getter/setter pairinherited
hashCode → int
The hash code for this object.
no setterinherited
id ↔ String
The ID of the Layer.
getter/setter pairinherited
maxZoom ↔ double?
The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.
getter/setter pairinherited
minZoom ↔ double?
The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.
getter/setter pairinherited
modelAllowDensityReduction ↔ bool?
If true, the models will be reduced in density based on the zoom level. This is useful for large datasets that may be slow to render. Default value: true.
getter/setter pair
modelAllowDensityReductionExpression ↔ List<Object>?
If true, the models will be reduced in density based on the zoom level. This is useful for large datasets that may be slow to render. Default value: true.
getter/setter pair
modelAmbientOcclusionIntensity ↔ double?
Intensity of the ambient occlusion if present in the 3D model. Default value: 1. Value range: 0, 1
getter/setter pair
modelAmbientOcclusionIntensityExpression ↔ List<Object>?
Intensity of the ambient occlusion if present in the 3D model. Default value: 1. Value range: 0, 1
getter/setter pair
modelCastShadows ↔ bool?
Enable/Disable shadow casting for this layer Default value: true.
getter/setter pair
modelCastShadowsExpression ↔ List<Object>?
Enable/Disable shadow casting for this layer Default value: true.
getter/setter pair
modelColor ↔ int?
The tint color of the model layer. model-color-mix-intensity (defaults to 0) defines tint(mix) intensity - this means that, this color is not used unless model-color-mix-intensity gets value greater than 0. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. Default value: "#ffffff".
getter/setter pair
modelColorExpression ↔ List<Object>?
The tint color of the model layer. model-color-mix-intensity (defaults to 0) defines tint(mix) intensity - this means that, this color is not used unless model-color-mix-intensity gets value greater than 0. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. Default value: "#ffffff".
getter/setter pair
modelColorMixIntensity ↔ double?
Intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors. Higher number will present a higher model-color contribution in mix. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. Default value: 0. Value range: 0, 1
getter/setter pair
modelColorMixIntensityExpression ↔ List<Object>?
Intensity of model-color (on a scale from 0 to 1) in color mix with original 3D model's colors. Higher number will present a higher model-color contribution in mix. Expressions that depend on measure-light are not supported when using GeoJSON or vector tile as the model layer source. Default value: 0. Value range: 0, 1
getter/setter pair
modelCutoffFadeRange ↔ double?
This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled. Default value: 0. Value range: 0, 1
getter/setter pair
modelCutoffFadeRangeExpression ↔ List<Object>?
This parameter defines the range for the fade-out effect before an automatic content cutoff on pitched map views. The automatic cutoff range is calculated according to the minimum required zoom level of the source and layer. The fade range is expressed in relation to the height of the map view. A value of 1.0 indicates that the content is faded to the same extent as the map's height in pixels, while a value close to zero represents a sharp cutoff. When the value is set to 0.0, the cutoff is completely disabled. Note: The property has no effect on the map if terrain is enabled. Default value: 0. Value range: 0, 1
getter/setter pair
modelElevationReference ↔ ModelElevationReference?
Selects the base of the model. Some modes might require precomputed elevation data in the tileset. When using vector tiled source as the model layer source and hd-road-markup elevation reference, this property acts as layout property and elevation is evaluated only in tile loading time. Default value: "ground".
getter/setter pair
modelElevationReferenceExpression ↔ List<Object>?
Selects the base of the model. Some modes might require precomputed elevation data in the tileset. When using vector tiled source as the model layer source and hd-road-markup elevation reference, this property acts as layout property and elevation is evaluated only in tile loading time. Default value: "ground".
getter/setter pair
modelEmissiveStrength ↔ double?
Strength of the emission. There is no emission for value 0. For value 1.0, only emissive component (no shading) is displayed and values above 1.0 produce light contribution to surrounding area, for some of the parts (e.g. doors). Expressions that depend on measure-light are only supported as a global layer value (and not for each feature) when using GeoJSON or vector tile as the model layer source. Default value: 0. Value range: 0, 5
getter/setter pair
modelEmissiveStrengthExpression ↔ List<Object>?
Strength of the emission. There is no emission for value 0. For value 1.0, only emissive component (no shading) is displayed and values above 1.0 produce light contribution to surrounding area, for some of the parts (e.g. doors). Expressions that depend on measure-light are only supported as a global layer value (and not for each feature) when using GeoJSON or vector tile as the model layer source. Default value: 0. Value range: 0, 5
getter/setter pair
modelHeightBasedEmissiveStrengthMultiplier ↔ List<double?>?
Emissive strength multiplier along model height (gradient begin, gradient end, value at begin, value at end, gradient curve power (logarithmic scale, curve power = pow(10, val)). Default value: 1,1,1,1,0.
getter/setter pair
modelHeightBasedEmissiveStrengthMultiplierExpression ↔ List<Object>?
Emissive strength multiplier along model height (gradient begin, gradient end, value at begin, value at end, gradient curve power (logarithmic scale, curve power = pow(10, val)). Default value: 1,1,1,1,0.
getter/setter pair
modelId ↔ String?
Model to render. It can be either a string referencing an element to the models root property or an internal or external URL Default value: "".
getter/setter pair
modelIdExpression ↔ List<Object>?
Model to render. It can be either a string referencing an element to the models root property or an internal or external URL Default value: "".
getter/setter pair
modelOpacity ↔ double?
The opacity of the model layer. Except for zoom, expressions that are data-driven are not supported if using GeoJSON or vector tile as the model layer source. Default value: 1. Value range: 0, 1
getter/setter pair
modelOpacityExpression ↔ List<Object>?
The opacity of the model layer. Except for zoom, expressions that are data-driven are not supported if using GeoJSON or vector tile as the model layer source. Default value: 1. Value range: 0, 1
getter/setter pair
modelReceiveShadows ↔ bool?
Enable/Disable shadow receiving for this layer Default value: true.
getter/setter pair
modelReceiveShadowsExpression ↔ List<Object>?
Enable/Disable shadow receiving for this layer Default value: true.
getter/setter pair
modelRotation ↔ List<double?>?
The rotation of the model in euler angles lon, lat, z. Default value: 0,0,0. The unit of modelRotation is in degrees.
getter/setter pair
modelRotationExpression ↔ List<Object>?
The rotation of the model in euler angles lon, lat, z. Default value: 0,0,0. The unit of modelRotation is in degrees.
getter/setter pair
modelRoughness ↔ double?
Material roughness. Material is fully smooth for value 0, and fully rough for value 1. Affects only layers using batched-model source. Default value: 1. Value range: 0, 1
getter/setter pair
modelRoughnessExpression ↔ List<Object>?
Material roughness. Material is fully smooth for value 0, and fully rough for value 1. Affects only layers using batched-model source. Default value: 1. Value range: 0, 1
getter/setter pair
modelScale ↔ List<double?>?
The scale of the model. Expressions that are zoom-dependent are not supported if using GeoJSON or vector tile as the model layer source. Default value: 1,1,1.
getter/setter pair
modelScaleExpression ↔ List<Object>?
The scale of the model. Expressions that are zoom-dependent are not supported if using GeoJSON or vector tile as the model layer source. Default value: 1,1,1.
getter/setter pair
modelScaleMode ↔ ModelScaleMode?
Defines scaling mode. Only applies to location-indicator type layers. Default value: "map".
getter/setter pair
modelScaleModeExpression ↔ List<Object>?
Defines scaling mode. Only applies to location-indicator type layers. Default value: "map".
getter/setter pair
modelTranslation ↔ List<double?>?
The translation of the model in meters in form of longitudal, latitudal, altitude offsets. Default value: 0,0,0.
getter/setter pair
modelTranslationExpression ↔ List<Object>?
The translation of the model in meters in form of longitudal, latitudal, altitude offsets. Default value: 0,0,0.
getter/setter pair
modelType ↔ ModelType?
Defines rendering behavior of model in respect to other 3D scene objects. Default value: "common-3d".
getter/setter pair
modelTypeExpression ↔ List<Object>?
Defines rendering behavior of model in respect to other 3D scene objects. Default value: "common-3d".
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slot ↔ String?
The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
getter/setter pairinherited
sourceId ↔ String
The id of the source.
getter/setter pair
sourceLayer ↔ String?
A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.
getter/setter pair
visibility ↔ Visibility?
The visibility of the layer.
getter/setter pairinherited
visibilityExpression ↔ List<Object>?
The visibility of the layer.
getter/setter pairinherited

Methods

getType() → String
Get the type of current layer as a String.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

decode(String properties) → ModelLayer