AdvancedMarker
Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
AdvancedMarker
extends the Marker
class and provides premium features for map markers.
It allows setting a custom View
as the marker icon using setIconView()
.
If a custom View
is set, the BitmapDescriptor
set via setIcon()
will be ignored.
You can retrieve the custom View
used for the marker icon using getIconView()
.
AdvancedMarker
inherits all functionalities from the standard Marker
class, including setting position, title, snippet, and other properties.
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
Object
clone ()
boolean
void
finalize ()
final Class <?>
getClass ()
int
hashCode ()
final void
notify ()
final void
notifyAll ()
String
toString ()
final void
wait (long arg0, int arg1)
final void
wait (long arg0)
final void
wait ()
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."],[],["`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"]]