public final class BitmapDescriptorFactory extends Object
Modifier and Type | Field and Description |
---|---|
static float |
HUE_AZURE
Constant value: 210.0
|
static float |
HUE_BLUE
Constant value: 240.0
|
static float |
HUE_CYAN
Constant value: 180.0
|
static float |
HUE_GREEN
Constant value: 120.0
|
static float |
HUE_MAGENTA
Constant value: 300.0
|
static float |
HUE_ORANGE
Constant value: 30.0
|
static float |
HUE_RED
Constant value: 0.0
|
static float |
HUE_ROSE
Constant value: 330.0
|
static float |
HUE_VIOLET
Constant value: 270.0
|
static float |
HUE_YELLOW
Constant value: 60.0
|
Modifier and Type | Method and Description |
---|---|
static BitmapDescriptor |
defaultMarker()
Creates a bitmap descriptor that refers to the default marker image.
|
static BitmapDescriptor |
defaultMarker(float hue)
Creates a bitmap descriptor that refers to a colorization of the default marker image.
|
static BitmapDescriptor |
fromAsset(String assetName)
Creates a
BitmapDescriptor using the name of an image in the assets directory. |
static BitmapDescriptor |
fromBitmap(android.graphics.Bitmap image)
Creates a bitmap descriptor from a given image.
|
static BitmapDescriptor |
fromFile(String fileName)
Creates a
BitmapDescriptor using the name of an image file located in the internal storage. |
static BitmapDescriptor |
fromPath(String path)
Creates a
BitmapDescriptor from an absolute file path. |
static BitmapDescriptor |
fromResource(int resourceId)
Creates a
BitmapDescriptor using the resource id of an image. |
public static final float HUE_AZURE
public static final float HUE_BLUE
public static final float HUE_CYAN
public static final float HUE_GREEN
public static final float HUE_MAGENTA
public static final float HUE_ORANGE
public static final float HUE_RED
public static final float HUE_ROSE
public static final float HUE_VIOLET
public static final float HUE_YELLOW
public static BitmapDescriptor defaultMarker()
public static BitmapDescriptor defaultMarker(float hue)
HUE_YELLOW
.hue
- The hue of the marker which must be in the range 0 <= hue < 360public static BitmapDescriptor fromAsset(String assetName)
BitmapDescriptor
using the name of an image in the assets directory.assetName
- The name of an image in the assets directory.BitmapDescriptor
that was loaded from the asset or null if failed to load.public static BitmapDescriptor fromBitmap(android.graphics.Bitmap image)
public static BitmapDescriptor fromFile(String fileName)
BitmapDescriptor
using the name of an image file located in the internal storage.
In particular, this calls Context.openFileInput(String)
.fileName
- The name of the image file.BitmapDescriptor
that was loaded from the asset or null if failed to load.public static BitmapDescriptor fromPath(String path)
BitmapDescriptor
from an absolute file path.path
- The absolute path of the image.BitmapDescriptor
that was loaded from the absolute path or null if failed to load.public static BitmapDescriptor fromResource(int resourceId)
BitmapDescriptor
using the resource id of an image.resourceId
- The resource id of an image.BitmapDescriptor
that was loaded from the asset or null if failed to load.Copyright © 2012–2013 Ordnance Survey. All rights reserved.