java.lang.Object | |
↳ | com.google.android.gms.maps.model.BitmapDescriptorFactory |
Used to create a definition of a Bitmap image, used for marker icons and ground overlays.
Prior to using any methods from this class, you must do one of the following to ensure that this class is initialized:
GoogleMap
to become available from a
MapFragment
or
MapView
that you have added to your application.
You can obtain the GoogleMap
instance by calling
getMapAsync()
and waiting for the onMapReady(GoogleMap map)
callback.
MapsInitializer.initialize(Context)
. As long as a
GooglePlayServicesNotAvailableException
isn't thrown, this class will be correctly initialized.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float | HUE_AZURE | ||||||||||
float | HUE_BLUE | ||||||||||
float | HUE_CYAN | ||||||||||
float | HUE_GREEN | ||||||||||
float | HUE_MAGENTA | ||||||||||
float | HUE_ORANGE | ||||||||||
float | HUE_RED | ||||||||||
float | HUE_ROSE | ||||||||||
float | HUE_VIOLET | ||||||||||
float | HUE_YELLOW |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a
BitmapDescriptor that refers to a colorization of the default marker image. | |||||||||||
Creates a
BitmapDescriptor that refers to the default marker image. | |||||||||||
Creates a
BitmapDescriptor using the name of a Bitmap image in the assets directory. | |||||||||||
Creates a
BitmapDescriptor from a given Bitmap image. | |||||||||||
Creates a
BitmapDescriptor using the name of a Bitmap image file located in the
internal storage. | |||||||||||
Creates a
BitmapDescriptor from the absolute file path of a Bitmap image. | |||||||||||
Creates a
BitmapDescriptor using the resource ID of a Bitmap image. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a BitmapDescriptor
that refers to a colorization of the default marker image.
For convenience, there is a predefined set of hue values. See example HUE_YELLOW
.
Parameters | |
---|---|
hue |
float :
The hue of the marker. Value must be greater or equal to 0 and less than 360.
|
Returns | |
---|---|
BitmapDescriptor |
Creates a BitmapDescriptor
that refers to the default marker image.
Returns | |
---|---|
BitmapDescriptor |
Creates a BitmapDescriptor
using the name of a Bitmap image in the assets directory.
Parameters | |
---|---|
assetName |
String :
The name of a Bitmap image in the assets directory. |
Returns | |
---|---|
BitmapDescriptor |
the BitmapDescriptor that was loaded from the asset or null if failed
to load.
|
Creates a BitmapDescriptor
from a given Bitmap image.
Parameters | |
---|---|
image |
Bitmap
|
Returns | |
---|---|
BitmapDescriptor |
Creates a BitmapDescriptor
using the name of a Bitmap image file located in the
internal storage. In particular, this calls openFileInput(String)
.
Parameters | |
---|---|
fileName |
String :
The name of the Bitmap image file. |
Returns | |
---|---|
BitmapDescriptor |
the BitmapDescriptor that was loaded from the asset or null if failed
to load.
|
See also:
Creates a BitmapDescriptor
from the absolute file path of a Bitmap image.
Parameters | |
---|---|
absolutePath |
String :
The absolute path of the Bitmap image. |
Returns | |
---|---|
BitmapDescriptor |
the BitmapDescriptor that was loaded from the absolute path or null
if failed to load.
|
Creates a BitmapDescriptor
using the resource ID of a Bitmap image.
Parameters | |
---|---|
resourceId |
int :
The resource ID of a Bitmap image. |
Returns | |
---|---|
BitmapDescriptor |
the BitmapDescriptor that was loaded from the asset or null if failed
to load.
|