java.lang.Object | |
↳ | com.google.android.gms.maps.model.MarkerOptions |
Defines MarkerOptions for a marker.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | NULL |
[Expand]
Inherited Constants
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
CREATOR |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Creates a new set of marker options.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Specifies the anchor to be at a particular point in the marker image.
|
||||||||||
|
|
||||||||||
|
Sets the draggability for the marker.
|
||||||||||
|
Horizontal distance, normalized to [0, 1], of the anchor from the left edge.
|
||||||||||
|
Vertical distance, normalized to [0, 1], of the anchor from the top edge.
|
||||||||||
|
Gets the custom icon set for this MarkerOptions object.
|
||||||||||
|
Returns the position set for this MarkerOptions object.
|
||||||||||
|
Gets the snippet set for this MarkerOptions object.
|
||||||||||
|
Gets the title set for this MarkerOptions object.
|
||||||||||
|
Sets the icon for the marker.
|
||||||||||
|
Gets the draggability setting for this MarkerOptions object.
|
||||||||||
|
Gets the visibility setting for this MarkerOptions object.
|
||||||||||
|
Sets the location for the marker.
|
||||||||||
|
Sets the snippet for the marker.
|
||||||||||
|
Sets the title for the marker.
|
||||||||||
|
Sets the visibility for the marker.
|
||||||||||
|
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
|||||||||||
![]() |
Creates a new set of marker options.
Specifies the anchor to be at a particular point in the marker image.
The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.
The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0], where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner. The anchoring point in a W x H image is the nearest discrete grid point in a (W + 1) x (H + 1) grid, obtained by scaling the then rounding. For example, in a 4 x 2 image, the anchor point (0.7, 0.6) resolves to the grid point at (3, 1).
*-----+-----+-----+-----* | | | | | | | | | | +-----+-----+-----+-----+ | | | X | | (U, V) = (0.7, 0.6) | | | | | *-----+-----+-----+-----* *-----+-----+-----+-----* | | | | | | | | | | +-----+-----+-----X-----+ (X, Y) = (3, 1) | | | | | | | | | | *-----+-----+-----+-----*
u | u-coordinate of the anchor, as a ratio of the image width (in the range [0, 1]) |
---|---|
v | v-coordinate of the anchor, as a ratio of the image height (in the range [0, 1]) |
Sets the draggability for the marker.
Horizontal distance, normalized to [0, 1], of the anchor from the left edge.
Vertical distance, normalized to [0, 1], of the anchor from the top edge.
Gets the custom icon set for this MarkerOptions object.
BitmapDescriptor
representing the custom icon, or null
if no custom icon is set. Returns the position set for this MarkerOptions object.
LatLng
object specifying the marker's current position. Gets the snippet set for this MarkerOptions object.
Gets the title set for this MarkerOptions object.
Sets the icon for the marker.
icon | if null, the default marker is used. |
---|
Gets the draggability setting for this MarkerOptions object.
true
if the marker is draggable; otherwise, returns false
. Gets the visibility setting for this MarkerOptions object.
true
if the marker is visible; otherwise, returns false
. Sets the location for the marker.
Sets the snippet for the marker.
Sets the title for the marker.
Sets the visibility for the marker.