summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java718
1 files changed, 0 insertions, 718 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
index e03358158f..55943f7e4e 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
@@ -11,7 +11,6 @@ import android.support.annotation.Nullable;
import android.support.annotation.Size;
import android.support.annotation.UiThread;
import android.text.TextUtils;
-import android.view.View;
import com.mapbox.android.gestures.AndroidGesturesManager;
import com.mapbox.android.gestures.MoveGestureDetector;
import com.mapbox.android.gestures.RotateGestureDetector;
@@ -20,14 +19,6 @@ import com.mapbox.android.gestures.StandardScaleGestureDetector;
import com.mapbox.geojson.Feature;
import com.mapbox.geojson.Geometry;
import com.mapbox.mapboxsdk.MapStrictMode;
-import com.mapbox.mapboxsdk.annotations.Annotation;
-import com.mapbox.mapboxsdk.annotations.BaseMarkerOptions;
-import com.mapbox.mapboxsdk.annotations.Marker;
-import com.mapbox.mapboxsdk.annotations.MarkerOptions;
-import com.mapbox.mapboxsdk.annotations.Polygon;
-import com.mapbox.mapboxsdk.annotations.PolygonOptions;
-import com.mapbox.mapboxsdk.annotations.Polyline;
-import com.mapbox.mapboxsdk.annotations.PolylineOptions;
import com.mapbox.mapboxsdk.camera.CameraPosition;
import com.mapbox.mapboxsdk.camera.CameraUpdate;
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
@@ -35,7 +26,6 @@ import com.mapbox.mapboxsdk.constants.MapboxConstants;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
import com.mapbox.mapboxsdk.location.LocationComponent;
-import com.mapbox.mapboxsdk.log.Logger;
import com.mapbox.mapboxsdk.offline.OfflineRegionDefinition;
import com.mapbox.mapboxsdk.style.expressions.Expression;
@@ -68,7 +58,6 @@ public final class MapboxMap {
private Style.OnStyleLoaded styleLoadedCallback;
private LocationComponent locationComponent;
- private AnnotationManager annotationManager;
@Nullable
private MapboxMap.OnFpsChangedListener onFpsChangedListener;
@@ -186,8 +175,6 @@ public final class MapboxMap {
*/
void onPreMapReady() {
transform.invalidateCameraPosition();
- annotationManager.reloadMarkers();
- annotationManager.adjustTopOffsetPixels(this);
}
/**
@@ -216,13 +203,6 @@ public final class MapboxMap {
}
/**
- * Called when the region is changing or has changed.
- */
- void onUpdateRegionChange() {
- annotationManager.update();
- }
-
- /**
* Called when the map frame is fully rendered.
*/
void onUpdateFullyRendered() {
@@ -859,520 +839,6 @@ public final class MapboxMap {
}
//
- // Annotations
- //
-
- /**
- * <p>
- * Adds a marker to this map.
- * </p>
- * The marker's icon is rendered on the map at the location {@code Marker.position}.
- * If {@code Marker.title} is defined, the map shows an info box with the marker's title and snippet.
- *
- * @param markerOptions A marker options object that defines how to render the marker
- * @return The {@code Marker} that was added to the map
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public Marker addMarker(@NonNull MarkerOptions markerOptions) {
- return annotationManager.addMarker(markerOptions, this);
- }
-
- /**
- * <p>
- * Adds a marker to this map.
- * </p>
- * The marker's icon is rendered on the map at the location {@code Marker.position}.
- * If {@code Marker.title} is defined, the map shows an info box with the marker's title and snippet.
- *
- * @param markerOptions A marker options object that defines how to render the marker
- * @return The {@code Marker} that was added to the map
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public Marker addMarker(@NonNull BaseMarkerOptions markerOptions) {
- return annotationManager.addMarker(markerOptions, this);
- }
-
- /**
- * <p>
- * Adds multiple markers to this map.
- * </p>
- * The marker's icon is rendered on the map at the location {@code Marker.position}.
- * If {@code Marker.title} is defined, the map shows an info box with the marker's title and snippet.
- *
- * @param markerOptionsList A list of marker options objects that defines how to render the markers
- * @return A list of the {@code Marker}s that were added to the map
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Marker> addMarkers(@NonNull List<? extends
- BaseMarkerOptions> markerOptionsList) {
- return annotationManager.addMarkers(markerOptionsList, this);
- }
-
- /**
- * <p>
- * Updates a marker on this map. Does nothing if the marker isn't already added.
- * </p>
- *
- * @param updatedMarker An updated marker object
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void updateMarker(@NonNull Marker updatedMarker) {
- annotationManager.updateMarker(updatedMarker, this);
- }
-
- /**
- * Adds a polyline to this map.
- *
- * @param polylineOptions A polyline options object that defines how to render the polyline
- * @return The {@code Polyine} that was added to the map
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public Polyline addPolyline(@NonNull PolylineOptions polylineOptions) {
- return annotationManager.addPolyline(polylineOptions, this);
- }
-
- /**
- * Adds multiple polylines to this map.
- *
- * @param polylineOptionsList A list of polyline options objects that defines how to render the polylines.
- * @return A list of the {@code Polyline}s that were added to the map.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Polyline> addPolylines(@NonNull List<PolylineOptions> polylineOptionsList) {
- return annotationManager.addPolylines(polylineOptionsList, this);
- }
-
- /**
- * Update a polyline on this map.
- *
- * @param polyline An updated polyline object.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void updatePolyline(@NonNull Polyline polyline) {
- annotationManager.updatePolyline(polyline);
- }
-
- /**
- * Adds a polygon to this map.
- *
- * @param polygonOptions A polygon options object that defines how to render the polygon.
- * @return The {@code Polygon} that was added to the map.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public Polygon addPolygon(@NonNull PolygonOptions polygonOptions) {
- return annotationManager.addPolygon(polygonOptions, this);
- }
-
- /**
- * Adds multiple polygons to this map.
- *
- * @param polygonOptionsList A list of polygon options objects that defines how to render the polygons
- * @return A list of the {@code Polygon}s that were added to the map
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Polygon> addPolygons(@NonNull List<PolygonOptions> polygonOptionsList) {
- return annotationManager.addPolygons(polygonOptionsList, this);
- }
-
- /**
- * Update a polygon on this map.
- *
- * @param polygon An updated polygon object
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void updatePolygon(@NonNull Polygon polygon) {
- annotationManager.updatePolygon(polygon);
- }
-
- /**
- * <p>
- * Convenience method for removing a Marker from the map.
- * </p>
- * Calls removeAnnotation() internally.
- *
- * @param marker Marker to remove
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void removeMarker(@NonNull Marker marker) {
- annotationManager.removeAnnotation(marker);
- }
-
- /**
- * <p>
- * Convenience method for removing a Polyline from the map.
- * </p>
- * Calls removeAnnotation() internally.
- *
- * @param polyline Polyline to remove
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void removePolyline(@NonNull Polyline polyline) {
- annotationManager.removeAnnotation(polyline);
- }
-
- /**
- * <p>
- * Convenience method for removing a Polygon from the map.
- * </p>
- * Calls removeAnnotation() internally.
- *
- * @param polygon Polygon to remove
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void removePolygon(@NonNull Polygon polygon) {
- annotationManager.removeAnnotation(polygon);
- }
-
- /**
- * Removes an annotation from the map.
- *
- * @param annotation The annotation object to remove.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void removeAnnotation(@NonNull Annotation annotation) {
- annotationManager.removeAnnotation(annotation);
- }
-
- /**
- * Removes an annotation from the map
- *
- * @param id The identifier associated to the annotation to be removed
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void removeAnnotation(long id) {
- annotationManager.removeAnnotation(id);
- }
-
- /**
- * Removes multiple annotations from the map.
- *
- * @param annotationList A list of annotation objects to remove.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void removeAnnotations(@NonNull List<? extends Annotation> annotationList) {
- annotationManager.removeAnnotations(annotationList);
- }
-
- /**
- * Removes all annotations from the map.
- *
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void removeAnnotations() {
- annotationManager.removeAnnotations();
- }
-
- /**
- * Removes all markers, polylines, polygons, overlays, etc from the map.
- *
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void clear() {
- annotationManager.removeAnnotations();
- }
-
- /**
- * Return a annotation based on its id.
- *
- * @param id the id used to look up an annotation
- * @return An annotation with a matched id, null is returned if no match was found
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @Nullable
- public Annotation getAnnotation(long id) {
- return annotationManager.getAnnotation(id);
- }
-
- /**
- * Returns a list of all the annotations on the map.
- *
- * @return A list of all the annotation objects. The returned object is a copy so modifying this
- * list will not update the map
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Annotation> getAnnotations() {
- return annotationManager.getAnnotations();
- }
-
- /**
- * Returns a list of all the markers on the map.
- *
- * @return A list of all the markers objects. The returned object is a copy so modifying this
- * list will not update the map.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Marker> getMarkers() {
- return annotationManager.getMarkers();
- }
-
- /**
- * Returns a list of all the polygons on the map.
- *
- * @return A list of all the polygon objects. The returned object is a copy so modifying this
- * list will not update the map.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Polygon> getPolygons() {
- return annotationManager.getPolygons();
- }
-
- /**
- * Returns a list of all the polylines on the map.
- *
- * @return A list of all the polylines objects. The returned object is a copy so modifying this
- * list will not update the map.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Polyline> getPolylines() {
- return annotationManager.getPolylines();
- }
-
- /**
- * Sets a callback that's invoked when the user clicks on a marker.
- *
- * @param listener The callback that's invoked when the user clicks on a marker.
- * To unset the callback, use null.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void setOnMarkerClickListener(@Nullable OnMarkerClickListener listener) {
- annotationManager.setOnMarkerClickListener(listener);
- }
-
- /**
- * Sets a callback that's invoked when the user clicks on a polygon.
- *
- * @param listener The callback that's invoked when the user clicks on a polygon.
- * To unset the callback, use null.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void setOnPolygonClickListener(@Nullable OnPolygonClickListener listener) {
- annotationManager.setOnPolygonClickListener(listener);
- }
-
- /**
- * Sets a callback that's invoked when the user clicks on a polyline.
- *
- * @param listener The callback that's invoked when the user clicks on a polyline.
- * To unset the callback, use null.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void setOnPolylineClickListener(@Nullable OnPolylineClickListener listener) {
- annotationManager.setOnPolylineClickListener(listener);
- }
-
- /**
- * <p>
- * Selects a marker. The selected marker will have it's info window opened.
- * Any other open info windows will be closed unless isAllowConcurrentMultipleOpenInfoWindows()
- * is true.
- * </p>
- * Selecting an already selected marker will have no effect.
- *
- * @param marker The marker to select.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void selectMarker(@NonNull Marker marker) {
- if (marker == null) {
- Logger.w(TAG, "marker was null, so just returning");
- return;
- }
- annotationManager.selectMarker(marker);
- }
-
- /**
- * Deselects any currently selected marker. All markers will have it's info window closed.
- *
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void deselectMarkers() {
- annotationManager.deselectMarkers();
- }
-
- /**
- * Deselects a currently selected marker. The selected marker will have it's info window closed.
- *
- * @param marker the marker to deselect
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void deselectMarker(@NonNull Marker marker) {
- annotationManager.deselectMarker(marker);
- }
-
- /**
- * Gets the currently selected marker.
- *
- * @return The currently selected marker.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @NonNull
- public List<Marker> getSelectedMarkers() {
- return annotationManager.getSelectedMarkers();
- }
-
- //
- // InfoWindow
- //
-
- /**
- * <p>
- * Sets a custom renderer for the contents of info window.
- * </p>
- * When set your callback is invoked when an info window is about to be shown. By returning
- * a custom {@link View}, the default info window will be replaced.
- *
- * @param infoWindowAdapter The callback to be invoked when an info window will be shown.
- * To unset the callback, use null.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void setInfoWindowAdapter(@Nullable InfoWindowAdapter infoWindowAdapter) {
- annotationManager.getInfoWindowManager().setInfoWindowAdapter(infoWindowAdapter);
- }
-
- /**
- * Gets the callback to be invoked when an info window will be shown.
- *
- * @return The callback to be invoked when an info window will be shown.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- @Nullable
- public InfoWindowAdapter getInfoWindowAdapter() {
- return annotationManager.getInfoWindowManager().getInfoWindowAdapter();
- }
-
- /**
- * Changes whether the map allows concurrent multiple infowindows to be shown.
- *
- * @param allow If true, map allows concurrent multiple infowindows to be shown.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public void setAllowConcurrentMultipleOpenInfoWindows(boolean allow) {
- annotationManager.getInfoWindowManager().setAllowConcurrentMultipleOpenInfoWindows(allow);
- }
-
- /**
- * Returns whether the map allows concurrent multiple infowindows to be shown.
- *
- * @return If true, map allows concurrent multiple infowindows to be shown.
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public boolean isAllowConcurrentMultipleOpenInfoWindows() {
- return annotationManager.getInfoWindowManager().isAllowConcurrentMultipleOpenInfoWindows();
- }
-
- //
// LatLngBounds
//
@@ -1807,66 +1273,6 @@ public final class MapboxMap {
onGesturesManagerInteractionListener.onRemoveMapLongClickListener(listener);
}
- /**
- * Sets a callback that's invoked when the user clicks on an info window.
- *
- * @param listener The callback that's invoked when the user clicks on an info window.
- * To unset the callback, use null.
- */
- public void setOnInfoWindowClickListener(@Nullable OnInfoWindowClickListener listener) {
- annotationManager.getInfoWindowManager().setOnInfoWindowClickListener(listener);
- }
-
- /**
- * Return the InfoWindow click listener
- *
- * @return Current active InfoWindow Click Listener
- */
- @Nullable
- public OnInfoWindowClickListener getOnInfoWindowClickListener() {
- return annotationManager.getInfoWindowManager().getOnInfoWindowClickListener();
- }
-
- /**
- * Sets a callback that's invoked when a marker's info window is long pressed.
- *
- * @param listener The callback that's invoked when a marker's info window is long pressed. To unset the callback,
- * use null.
- */
- public void setOnInfoWindowLongClickListener(@Nullable OnInfoWindowLongClickListener
- listener) {
- annotationManager.getInfoWindowManager().setOnInfoWindowLongClickListener(listener);
- }
-
- /**
- * Return the InfoWindow long click listener
- *
- * @return Current active InfoWindow long Click Listener
- */
- @Nullable
- public OnInfoWindowLongClickListener getOnInfoWindowLongClickListener() {
- return annotationManager.getInfoWindowManager().getOnInfoWindowLongClickListener();
- }
-
- /**
- * Set an callback to be invoked when an InfoWindow closes.
- *
- * @param listener callback invoked when an InfoWindow closes
- */
- public void setOnInfoWindowCloseListener(@Nullable OnInfoWindowCloseListener listener) {
- annotationManager.getInfoWindowManager().setOnInfoWindowCloseListener(listener);
- }
-
- /**
- * Return the InfoWindow close listener
- *
- * @return Current active InfoWindow Close Listener
- */
- @Nullable
- public OnInfoWindowCloseListener getOnInfoWindowCloseListener() {
- return annotationManager.getInfoWindowManager().getOnInfoWindowCloseListener();
- }
-
//
// Invalidate
//
@@ -1954,9 +1360,6 @@ public final class MapboxMap {
this.locationComponent = locationComponent;
}
- void injectAnnotationManager(AnnotationManager annotationManager) {
- this.annotationManager = annotationManager.bind(this);
- }
/**
* Returns the {@link LocationComponent} that can be used to display user's location on the map.
@@ -2195,127 +1598,6 @@ public final class MapboxMap {
}
/**
- * Interface definition for a callback to be invoked when the user clicks on a marker.
- *
- * @see MapboxMap#setOnMarkerClickListener(OnMarkerClickListener)
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public interface OnMarkerClickListener {
- /**
- * Called when the user clicks on a marker.
- *
- * @param marker The marker the user clicked on.
- * @return If true the listener has consumed the event and the info window will not be shown.
- */
- boolean onMarkerClick(@NonNull Marker marker);
- }
-
- /**
- * Interface definition for a callback to be invoked when the user clicks on a polygon.
- *
- * @see MapboxMap#setOnPolygonClickListener(OnPolygonClickListener)
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public interface OnPolygonClickListener {
- /**
- * Called when the user clicks on a polygon.
- *
- * @param polygon The polygon the user clicked on.
- */
- void onPolygonClick(@NonNull Polygon polygon);
- }
-
- /**
- * Interface definition for a callback to be invoked when the user clicks on a polyline.
- *
- * @see MapboxMap#setOnPolylineClickListener(OnPolylineClickListener)
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public interface OnPolylineClickListener {
- /**
- * Called when the user clicks on a polyline.
- *
- * @param polyline The polyline the user clicked on.
- */
- void onPolylineClick(@NonNull Polyline polyline);
- }
-
- /**
- * Interface definition for a callback to be invoked when the user clicks on an info window.
- *
- * @see MapboxMap#setOnInfoWindowClickListener(OnInfoWindowClickListener)
- */
- public interface OnInfoWindowClickListener {
- /**
- * Called when the user clicks on an info window.
- *
- * @param marker The marker of the info window the user clicked on.
- * @return If true the listener has consumed the event and the info window will not be closed.
- */
- boolean onInfoWindowClick(@NonNull Marker marker);
- }
-
- /**
- * Interface definition for a callback to be invoked when the user long presses on a marker's info window.
- *
- * @see MapboxMap#setOnInfoWindowClickListener(OnInfoWindowClickListener)
- */
- public interface OnInfoWindowLongClickListener {
-
- /**
- * Called when the user makes a long-press gesture on the marker's info window.
- *
- * @param marker The marker were the info window is attached to
- */
- void onInfoWindowLongClick(@NonNull Marker marker);
- }
-
- /**
- * Interface definition for a callback to be invoked when a marker's info window is closed.
- *
- * @see MapboxMap#setOnInfoWindowCloseListener(OnInfoWindowCloseListener)
- */
- public interface OnInfoWindowCloseListener {
-
- /**
- * Called when the marker's info window is closed.
- *
- * @param marker The marker of the info window that was closed.
- */
- void onInfoWindowClose(@NonNull Marker marker);
- }
-
- /**
- * Interface definition for a callback to be invoked when an info window will be shown.
- *
- * @see MapboxMap#setInfoWindowAdapter(InfoWindowAdapter)
- * @deprecated As of 7.0.0,
- * use <a href="https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-annotation">
- * Mapbox Annotation Plugin</a> instead
- */
- @Deprecated
- public interface InfoWindowAdapter {
- /**
- * Called when an info window will be shown as a result of a marker click.
- *
- * @param marker The marker the user clicked on.
- * @return View to be shown as a info window. If null is returned the default
- * info window will be shown.
- */
- @Nullable
- View getInfoWindow(@NonNull Marker marker);
- }
-
- /**
* Interface definition for a callback to be invoked when a task is complete or cancelled.
*/
public interface CancelableCallback {