public static interface

AmazonMap.OnMarkerClickListener

com.amazon.geo.mapsv2.AmazonMap.OnMarkerClickListener

Class Overview

Interface for receiving callbacks when the user clicks a Marker. Callbacks always occur on the main thread.

Summary

Public Methods
abstract boolean onMarkerClick(Marker marker)
Called when the user clicks a Marker.

Public Methods

public abstract boolean onMarkerClick (Marker marker)

Called when the user clicks a Marker. By default, clicking a marker does the following:

  • Centers the map camera on the marker.
  • Displays an info window for the marker if the marker has a title defined. See setTitle(String).
  • Displays the Map Toolbar with buttons to open the Amazon Maps app if isMapToolbarEnabled() is true.

To consume the marker click event and block the the default behavior, return true. To allow the default behavior, return false.

Parameters
marker The Marker the user clicked.
Returns
  • true to consume the event and block the default behavior, or false to allow the default behavior.