AdvancedMarker

  • AdvancedMarker extends the Marker class, offering premium features for map markers.

  • It is designed for compile-time compatibility and doesn't apply to the Navigation SDK.

  • This class allows using custom Android Views as marker icons, overriding any BitmapDescriptor icons.

  • AdvancedMarker inherits standard Marker functionalities like positioning, visibility, and info windows.

public class AdvancedMarker extends Marker

Extends Marker, and provides additional premium features.

This class does not apply to the Navigation SDK. It exists for compile time compatibility with com.google.android.gms:play-services-maps only.

Public Method Summary

View
getIconView()
Gets the View being used for the marker if the marker has any.
void
setIconView(View view)
Sets the view to be used for the marker.

Inherited Method Summary

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)

Sets the view to be used for the marker.

If iconView is set, the BitmapDescriptor set via Marker.setIcon(BitmapDescriptor) is ignored.

Parameters
view the view instance to be used as a marker on the map.