BitmapDescriptor class abstract

Defines a bitmap image. For a marker, this class can be used to set the image of the marker icon. For a ground overlay, it can be used to set the image to place on the surface of the earth.

Use the BitmapDescriptor.asset or AssetMapBitmap.create to create a BitmapDescriptor image from an asset. Use the BitmapDescriptor.bytes or BytesMapBitmap to create a BitmapDescriptor image from a list of bytes. Use the BitmapDescriptor.defaultMarker to create a BitmapDescriptor for a default marker icon. Use the BitmapDescriptor.defaultMarkerWithHue to create a BitmapDescriptor for a default marker icon with a hue value.

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
toJson() Object
Convert the object to a Json format.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

asset(ImageConfiguration configuration, String assetName, {AssetBundle? bundle, String? package, double? width, double? height, double? imagePixelRatio, MapBitmapScaling bitmapScaling = MapBitmapScaling.auto}) Future<AssetMapBitmap>
Creates a BitmapDescriptor from an asset using AssetMapBitmap.
bytes(Uint8List byteData, {double? imagePixelRatio, double? width, double? height, MapBitmapScaling bitmapScaling = MapBitmapScaling.auto}) BytesMapBitmap
Creates a BitmapDescriptor from byte data using BytesMapBitmap.
defaultMarkerWithHue(double hue) BitmapDescriptor
Creates a BitmapDescriptor that refers to a colorization of the default marker image. For convenience, there is a predefined set of hue values. See e.g. hueYellow.
fromAssetImage(ImageConfiguration configuration, String assetName, {AssetBundle? bundle, String? package, bool mipmaps = true}) Future<BitmapDescriptor>
Creates a BitmapDescriptor from an asset image.
fromBytes(Uint8List byteData, {Size? size}) BitmapDescriptor
Creates a BitmapDescriptor using an array of bytes that must be encoded as PNG. On the web, the size parameter represents the physical size of the bitmap, regardless of the actual resolution of the encoded PNG. This helps the browser to render High-DPI images at the correct size. size is not required (and ignored, if passed) in other platforms.
fromJson(Object json) BitmapDescriptor
The inverse of .toJson.

Constants

defaultMarker → const BitmapDescriptor
Creates a BitmapDescriptor that refers to the default marker image.
hueAzure → const double
Convenience hue value representing azure.
hueBlue → const double
Convenience hue value representing blue.
hueCyan → const double
Convenience hue value representing cyan.
hueGreen → const double
Convenience hue value representing green.
hueMagenta → const double
Convenience hue value representing magenta.
hueOrange → const double
Convenience hue value representing orange.
hueRed → const double
Convenience hue value representing red.
hueRose → const double
Convenience hue value representing rose.
hueViolet → const double
Convenience hue value representing violet.
hueYellow → const double
Convenience hue value representing yellow.