Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.
HUAWEI HMS Core
Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.
public final class BitmapDescriptorFactory
Creates the definition of a bitmap image.
| Name | Type | Description |
| HUE_AZURE | public static final float | Azure. |
| HUE_BLUE | public static final float | Blue. |
| HUE_CYAN | public static final float | Cyan. |
| HUE_GREEN | public static final float | Green. |
| HUE_MAGENTA | public static final float | Magenta. |
| HUE_ORANGE | public static final float | Orange. |
| HUE_RED | public static final float | Red. |
| HUE_ROSE | public static final float | Rose. |
| HUE_VIOLET | public static final float | Violet. |
| HUE_YELLOW | public static final float | Yellow. |
None.
| Return type | Method name |
| static BitmapDescriptor | defaultMarker(float hue) |
| static BitmapDescriptor | defaultMarker() |
| static BitmapDescriptor | fromAsset(String assetName) |
| static BitmapDescriptor | fromBitmap(Bitmap image) |
| static BitmapDescriptor | fromFile(String fileName) |
| static BitmapDescriptor | fromPath(String absolutePath) |
| static BitmapDescriptor | fromResource(int resourceId) |
| Method |
| public static BitmapDescriptor defaultMarker(float hue) |
| Creates BitmapDescriptor objects for default marker icons in different colors using different hue values. |
| The BitmapDescriptorFactory class provides 10 hue values. You can call this method by transferring a hue value. For details, please refer to public fields of this class. |
Parameters:
| Parameter name | Parameter desc |
| hue | Hue value. |
Return:
| Return type | Parameter desc |
| BitmapDescriptor | BitmapDescriptor object. |
| Method |
| public static BitmapDescriptor defaultMarker() |
| Creates a BitmapDescriptor object for a default marker icon. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| BitmapDescriptor | BitmapDescriptor object. |
| Method |
| public static BitmapDescriptor fromAsset(String assetName) |
| Creates a BitmapDescriptor object using an image resource in the assets directory. |
Parameters:
| Parameter name | Parameter desc |
| assetName | Image path in assets, including the image name. |
Return:
| Return type | Parameter desc |
| BitmapDescriptor | BitmapDescriptor object. If the image does not exist, null is returned. |
| Method |
| public static BitmapDescriptor fromBitmap(Bitmap image) |
Creates a BitmapDescriptor object using a bitmap image. |
Parameters:
| Parameter name | Parameter desc |
| image | Bitmap image. |
Return:
| Return type | Parameter desc |
| BitmapDescriptor | BitmapDescriptor object. If null is passed for the input parameter, null is returned. |
| Method |
| public static BitmapDescriptor fromFile(String fileName) |
| Creates a BitmapDescriptor object using the name of an image file in the internal storage. |
Parameters:
| Parameter name | Parameter desc |
| fileName | Name of an image file in the internal storage. |
Return:
| Return type | Parameter desc |
| BitmapDescriptor | BitmapDescriptor object. If the file does not exist, null is returned. |
| Method |
| public static BitmapDescriptor fromPath(String absolutePath) |
| Creates a BitmapDescriptor object using the absolute path to an image resource. |
Parameters:
| Parameter name | Parameter desc |
| absolutePath | Absolute file path of an image. |
Return:
| Return type | Parameter desc |
| BitmapDescriptor | BitmapDescriptor object. If the file does not exist, null is returned. |
| Method |
| public static BitmapDescriptor fromResource(int resourceId) |
Creates a BitmapDescriptor object using the resource ID of an image. |
Parameters:
| Parameter name | Parameter desc |
| resourceId | Resource ID of a bitmap image. |
Return:
| Return type | Parameter desc |
| BitmapDescriptor | BitmapDescriptor object. If the file does not exist, null is returned. |
Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
Quick start
Helps you find desired resources with ease.