bitmapDescriptor property

Future<BitmapDescriptor> bitmapDescriptor

This getter is used to get the BitmapDescriptor required by the Marker.

If both assetPath and icon are passed, BitmapDescriptor created from assetPath is returned.

If both assetPath and icon are not passed, then BitmapDescriptor.defaultMarker is returned.

Implementation

Future<BitmapDescriptor> get bitmapDescriptor async {
  if (assetPath != null)
    return await _getMarkerFromAsset(
      path: assetPath!,
      size: assetMarkerSize ?? Constants.DEFAULT_MARKER_SIZE,
    );

  if (icon != null) return await _getMarkerFromMaterialIcon(icon: icon!);

  return BitmapDescriptor.defaultMarker;
}