ModelSourceModel class

Defines a single 3D model within a ModelSource. @see The online documentation

Constructors

ModelSourceModel({required String id, Map<String, dynamic>? featureProperties, List<String>? materialOverrideNames, List<ModelMaterialOverride>? materialOverrides, List<String>? nodeOverrideNames, List<ModelNodeOverride>? nodeOverrides, List<double?>? orientation, List<double?>? position, String? uri})

Properties

featureProperties Map<String, dynamic>?
An object defining custom properties of the model. Properties are accessible as feature properties in expressions.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
The model's identifier.
getter/setter pair
materialOverrideNames List<String>?
An array of one or more model material names whose properties will be overridden from model layer paint properties.
getter/setter pair
materialOverrides List<ModelMaterialOverride>?
A collection of material overrides.
getter/setter pair
nodeOverrideNames List<String>?
An array of one or more model node names whose transform will be overridden from model layer paint properties.
getter/setter pair
nodeOverrides List<ModelNodeOverride>?
A collection of node overrides.
getter/setter pair
orientation List<double?>?
Orientation of the model in euler angles x, y, z. Default value: 0,0,0. The unit of orientation is in degrees.
getter/setter pair
position List<double?>?
Position of the model in longitude and latitude lng, lat. Default value: 0,0. Minimum value: -180,-90. Maximum value: 180,90.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri String?
A URL to a model resource. Supported protocols are http:, https:, and mapbox://<Model ID>.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this ModelSourceModel to its JSON representation, keyed by id.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(String id, Map<String, dynamic> json) ModelSourceModel
Creates a ModelSourceModel from its id and a decoded JSON object.