AdvancedMarker
Stay organized with collections
Save and categorize content based on your preferences.
Extends Marker
, and
provides additional premium features.
Public Method Summary
View
|
getIconView
() Gets the view being used for the marker if the marker has any.
|
void |
|
Inherited Method Summary
From class com.google.android.gms.maps.model.Marker
boolean |
|
float |
getAlpha
() Gets the alpha of the marker.
|
String
|
getId
() Gets this marker's id.
|
LatLng
|
|
float |
|
String
|
|
Object
|
getTag
() Gets the tag for the marker.
|
String
|
getTitle
() Gets the title of the marker.
|
float |
getZIndex
() Returns the zIndex of the marker.
|
int |
|
void |
hideInfoWindow
() Hides the info window if it is shown from this marker.
|
boolean |
|
boolean |
isFlat
() Gets the flat setting of the Marker.
|
boolean |
isInfoWindowShown
() Returns whether the info window is currently shown above this marker.
|
boolean |
isVisible
() Gets the visibility setting of this marker.
|
void |
remove
() Removes this marker from the map.
|
void |
setAlpha
(float alpha) Sets the alpha (opacity) of the marker.
|
void |
setAnchor
(float anchorU, float anchorV) Sets the anchor point for the marker.
|
void |
setDraggable
(boolean draggable) Sets the draggability of the marker.
|
void |
setFlat
(boolean flat) Sets whether this marker should be flat against the map true
or a billboard facing the camera false
.
|
void |
|
void |
setInfoWindowAnchor
(float anchorU, float anchorV) Specifies the point in the marker image at which to anchor the info
window when it is displayed.
|
void |
|
void |
setRotation
(float rotation) Sets the rotation of the marker in degrees clockwise about the marker's
anchor point.
|
void |
|
void |
|
void |
|
void |
setVisible
(boolean visible) Sets the visibility of this marker.
|
void |
setZIndex
(float zIndex) Sets the zIndex of the marker.
|
void |
|
From class java.lang.Object
Public Methods
public View
getIconView
()
Gets the view being used for the marker if the marker has any.
Returns
- view being used as a Marker icon or null
public void
setIconView
( View
view)
Parameters
view
the view instance to be used as a marker on the map.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eAdvancedMarker\u003c/code\u003e extends the \u003ccode\u003eMarker\u003c/code\u003e class and provides premium features for map markers.\u003c/p\u003e\n"],["\u003cp\u003eIt allows setting a custom \u003ccode\u003eView\u003c/code\u003e as the marker icon using \u003ccode\u003esetIconView()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf a custom \u003ccode\u003eView\u003c/code\u003e is set, the \u003ccode\u003eBitmapDescriptor\u003c/code\u003e set via \u003ccode\u003esetIcon()\u003c/code\u003e will be ignored.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the custom \u003ccode\u003eView\u003c/code\u003e used for the marker icon using \u003ccode\u003egetIconView()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAdvancedMarker\u003c/code\u003e inherits all functionalities from the standard \u003ccode\u003eMarker\u003c/code\u003e class, including setting position, title, snippet, and other properties.\u003c/p\u003e\n"]]],["`AdvancedMarker` extends `Marker`, offering premium features. Key actions include: `getIconView()`, which retrieves the marker's view if present, and `setIconView(View view)`, which sets a custom view as the marker's icon, overriding any `BitmapDescriptor`. Inherited methods allow manipulation of marker properties like `alpha`, `position`, `rotation`, `visibility`, and more. It also offers control over the info window, such as `showInfoWindow()` and `hideInfoWindow()`.\n"],null,[]]