public class Marker extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>| Modifier and Type | Field and Description |
|---|---|
static Parcelable.Creator<Marker> |
CREATOR
Deprecated.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Modifier and Type | Method and Description |
|---|---|
int |
describeContents()
Deprecated.
|
long |
getId() |
Location |
getLocation() |
Object |
getTag() |
void |
setAnchorPoint(int x,
int y)
The anchor point defines which point of the icon is used as the reference for associating the
icon to the map coordinates.
|
void |
setIcon(Context context,
Drawable drawable)
|
void |
setIcon(String iconPath)
Sets the icon for this
Marker. |
void |
setLocation(Location location)
Set location for the marker.
|
void |
setTag(Object tag)
|
String |
toString()
This class converted to a JSON string.
|
void |
writeToParcel(Parcel dest,
int flags)
Deprecated.
|
@Deprecated public static final Parcelable.Creator<Marker> CREATOR
@Deprecated public void writeToParcel(Parcel dest, int flags)
writeToParcel in interface Parcelable@Deprecated public int describeContents()
describeContents in interface Parcelablepublic void setIcon(String iconPath) throws FileNotFoundException, MarkerOperationException
Marker. The file should be present on the device and
accessible.iconPath - The path to the icon file.FileNotFoundException - When the file does not exist or cannot be read.MarkerOperationException - When the Marker could not be updated with the new icon.public void setIcon(Context context, Drawable drawable) throws FileNotFoundException, MarkerOperationException
context - This Context is used to determine the cache directory.drawable - The Drawable to use as an icon. May not be null.FileNotFoundException - When the icon cannot be found or is null.MarkerOperationException - When the Marker could not be updated with the new icon.public void setAnchorPoint(int x,
int y)
throws MarkerOperationException
x - The horizontal position.y - The vertical position.MarkerOperationException - When the anchor point could not be successfully set.public void setLocation(Location location) throws MarkerOperationException
location - new location.MarkerOperationException - When the location could not be successfully set.public void setTag(Object tag)
tag - The object to use as a tag.public long getId()
Marker as used by the map.