MarkerIcon class sealed
The image of the markers of a layer, which the map adds to the style for it, see Layer.icon.
The map adds each image once, for every layer that shows it, removes it once no layer shows it, and adds it again when another style loads. Layers share an image when their icons are equal.
- Annotations
Constructors
- MarkerIcon.asset(String path, {double pixelRatio})
-
The image of the Flutter asset
path, withpixelRatioimage pixels per logical pixel, see StyleController.addImage.constfactory - MarkerIcon.bytes(Uint8List bytes, {double pixelRatio})
-
The encoded image
bytes, such as a PNG, withpixelRatioimage pixels per logical pixel, see StyleController.addImage.constfactory -
MarkerIcon.expression(Expression<
String> imageId) -
The image of the style that
imageIdpicks for each feature, such asExpression.get('icon').asString()for the image named in a property of the feature. The map doesn't add or remove images for it.constfactory - MarkerIcon.iconData(IconData icon, {Color color, double size})
-
The icon
icon, such as one of theIconsof Material, drawnsizelogical pixels large incolor.constfactory - MarkerIcon.named(String imageId)
-
The image
imageIdthat the style already has, from its sprite or from StyleController.addImage. The map doesn't add or remove it.constfactory -
MarkerIcon.provider(ImageProvider<
Object> provider) -
The image of the Flutter ImageProvider
provider, such as an AssetImage or a NetworkImage, at the scale of the image it loads.constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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