@UiThread
public final class TrimbleMapsMap
extends java.lang.Object
TrimbleMapsMap
object directly, rather,
you must obtain one from the getMapAsync() method on a MapFragment or MapView that you have
added to your application.
Note: Similar to a View object, a TrimbleMapsMap should only be read and modified from the main thread.
Modifier and Type | Class | Description |
---|---|---|
static interface |
TrimbleMapsMap.CancelableCallback |
Interface definition for a callback to be invoked when a task is complete or cancelled.
|
static interface |
TrimbleMapsMap.InfoWindowAdapter |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
static interface |
TrimbleMapsMap.OnCameraIdleListener |
Interface definition for a callback to be invoked for when camera movement has ended.
|
static interface |
TrimbleMapsMap.OnCameraMoveCanceledListener |
Interface definition for a callback to be invoked for when the camera's motion has been stopped or when the camera
starts moving for a new reason.
|
static interface |
TrimbleMapsMap.OnCameraMoveListener |
Interface definition for a callback to be invoked for when the camera changes position.
|
static interface |
TrimbleMapsMap.OnCameraMoveStartedListener |
Interface definition for a callback to be invoked for when the camera motion starts.
|
static interface |
TrimbleMapsMap.OnCompassAnimationListener |
Interface definition for a callback to be invoked for when the compass is animating.
|
static interface |
TrimbleMapsMap.OnDeveloperAnimationListener |
Internal use.
|
static interface |
TrimbleMapsMap.OnFlingListener |
Interface definition for a callback to be invoked when the map is flinged.
|
static interface |
TrimbleMapsMap.OnFpsChangedListener |
Interface definition for a callback to be invoked when a frame is rendered to the map view.
|
static interface |
TrimbleMapsMap.OnInfoWindowClickListener |
Interface definition for a callback to be invoked when the user clicks on an info window.
|
static interface |
TrimbleMapsMap.OnInfoWindowCloseListener |
Interface definition for a callback to be invoked when a marker's info window is closed.
|
static interface |
TrimbleMapsMap.OnInfoWindowLongClickListener |
Interface definition for a callback to be invoked when the user long presses on a marker's info window.
|
static interface |
TrimbleMapsMap.OnMapClickListener |
Interface definition for a callback to be invoked when the user clicks on the map view.
|
static interface |
TrimbleMapsMap.OnMapLongClickListener |
Interface definition for a callback to be invoked when the user long clicks on the map view.
|
static interface |
TrimbleMapsMap.OnMarkerClickListener |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
static interface |
TrimbleMapsMap.OnMoveListener |
Interface definition for a callback to be invoked when the map is moved.
|
static interface |
TrimbleMapsMap.OnPolygonClickListener |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
static interface |
TrimbleMapsMap.OnPolylineClickListener |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
static interface |
TrimbleMapsMap.OnRotateListener |
Interface definition for a callback to be invoked when the map is rotated.
|
static interface |
TrimbleMapsMap.OnScaleListener |
Interface definition for a callback to be invoked when the map is scaled.
|
static interface |
TrimbleMapsMap.OnShoveListener |
Interface definition for a callback to be invoked when the map is tilted.
|
static interface |
TrimbleMapsMap.SnapshotReadyCallback |
Interface definition for a callback to be invoked when the snapshot has been taken.
|
Modifier and Type | Method | Description |
---|---|---|
Marker |
addMarker(BaseMarkerOptions markerOptions) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
Marker |
addMarker(MarkerOptions markerOptions) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
java.util.List<Marker> |
addMarkers(java.util.List<? extends BaseMarkerOptions> markerOptionsList) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
addOnCameraIdleListener(TrimbleMapsMap.OnCameraIdleListener listener) |
Adds a callback that is invoked when camera movement has ended.
|
void |
addOnCameraMoveCancelListener(TrimbleMapsMap.OnCameraMoveCanceledListener listener) |
Adds a callback that is invoked when camera movement was cancelled.
|
void |
addOnCameraMoveListener(TrimbleMapsMap.OnCameraMoveListener listener) |
Adds a callback that is invoked when camera position changes.
|
void |
addOnCameraMoveStartedListener(TrimbleMapsMap.OnCameraMoveStartedListener listener) |
Adds a callback that is invoked when camera movement has started.
|
void |
addOnFlingListener(TrimbleMapsMap.OnFlingListener listener) |
Adds a callback that's invoked when the map is flinged.
|
void |
addOnMapClickListener(TrimbleMapsMap.OnMapClickListener listener) |
Adds a callback that's invoked when the user clicks on the map view.
|
void |
addOnMapLongClickListener(TrimbleMapsMap.OnMapLongClickListener listener) |
Adds a callback that's invoked when the user long clicks on the map view.
|
void |
addOnMoveListener(TrimbleMapsMap.OnMoveListener listener) |
Adds a callback that's invoked when the map is moved.
|
void |
addOnRotateListener(TrimbleMapsMap.OnRotateListener listener) |
Adds a callback that's invoked when the map is rotated.
|
void |
addOnScaleListener(TrimbleMapsMap.OnScaleListener listener) |
Adds a callback that's invoked when the map is scaled.
|
void |
addOnShoveListener(TrimbleMapsMap.OnShoveListener listener) |
Adds a callback that's invoked when the map is tilted.
|
Polygon |
addPolygon(PolygonOptions polygonOptions) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
java.util.List<Polygon> |
addPolygons(java.util.List<PolygonOptions> polygonOptionsList) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
Polyline |
addPolyline(PolylineOptions polylineOptions) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
java.util.List<Polyline> |
addPolylines(java.util.List<PolylineOptions> polylineOptionsList) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
animateCamera(CameraUpdate update) |
Animate the camera to a new location defined within
CameraUpdate using a transition
animation that evokes powered flight. |
void |
animateCamera(CameraUpdate update,
int durationMs) |
Animate the camera to a new location defined within
CameraUpdate using a transition
animation that evokes powered flight. |
void |
animateCamera(CameraUpdate update,
int durationMs,
TrimbleMapsMap.CancelableCallback callback) |
Animate the camera to a new location defined within
CameraUpdate using a transition
animation that evokes powered flight. |
void |
animateCamera(CameraUpdate update,
TrimbleMapsMap.CancelableCallback callback) |
Animate the camera to a new location defined within
CameraUpdate using a transition
animation that evokes powered flight. |
void |
cancelAllVelocityAnimations() |
Interrupts any ongoing gesture velocity animations.
|
void |
cancelTransitions() |
Cancels ongoing animations.
|
void |
clear() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
cycleDebugOptions() |
Deprecated.
|
void |
deselectMarker(Marker marker) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
deselectMarkers() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
easeCamera(CameraUpdate update) |
Gradually move the camera by the default duration, zoom will not be affected unless specified
within
CameraUpdate . |
void |
easeCamera(CameraUpdate update,
int durationMs) |
Gradually move the camera by a specified duration in milliseconds, zoom will not be affected
unless specified within
CameraUpdate . |
void |
easeCamera(CameraUpdate update,
int durationMs,
boolean easingInterpolator) |
Gradually move the camera by a specified duration in milliseconds, zoom will not be affected
unless specified within
CameraUpdate . |
void |
easeCamera(CameraUpdate update,
int durationMs,
boolean easingInterpolator,
TrimbleMapsMap.CancelableCallback callback) |
Gradually move the camera by a specified duration in milliseconds, zoom will not be affected
unless specified within
CameraUpdate . |
void |
easeCamera(CameraUpdate update,
int durationMs,
TrimbleMapsMap.CancelableCallback callback) |
Gradually move the camera by a specified duration in milliseconds, zoom will not be affected
unless specified within
CameraUpdate . |
void |
easeCamera(CameraUpdate update,
TrimbleMapsMap.CancelableCallback callback) |
Gradually move the camera by the default duration, zoom will not be affected unless specified
within
CameraUpdate . |
Annotation |
getAnnotation(long id) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
java.util.List<Annotation> |
getAnnotations() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
CameraPosition |
getCameraForGeometry(com.trimblemaps.geojson.Geometry geometry) |
Get a camera position that fits a provided shape.
|
CameraPosition |
getCameraForGeometry(com.trimblemaps.geojson.Geometry geometry,
double bearing,
double tilt) |
Get a camera position that fits a provided shape with a given bearing and tilt.
|
CameraPosition |
getCameraForGeometry(com.trimblemaps.geojson.Geometry geometry,
int[] padding) |
Get a camera position that fits a provided shape and padding.
|
CameraPosition |
getCameraForGeometry(com.trimblemaps.geojson.Geometry geometry,
int[] padding,
double bearing,
double tilt) |
Get a camera position that fits a provided shape with a given padding, bearing and tilt.
|
CameraPosition |
getCameraForLatLngBounds(LatLngBounds latLngBounds) |
Get a camera position that fits a provided bounds and the current camera tilt and bearing.
|
CameraPosition |
getCameraForLatLngBounds(LatLngBounds latLngBounds,
double bearing,
double tilt) |
Get a camera position that fits a provided bounds, bearing and tilt.
|
CameraPosition |
getCameraForLatLngBounds(LatLngBounds latLngBounds,
int[] padding) |
Get a camera position that fits a provided bounds and padding and the current camera tilt and bearing.
|
CameraPosition |
getCameraForLatLngBounds(LatLngBounds latLngBounds,
int[] padding,
double bearing,
double tilt) |
Get a camera position that fits a provided bounds, padding, bearing and tilt.
|
CameraPosition |
getCameraPosition() |
Gets the current position of the camera.
|
com.trimblemaps.android.gestures.AndroidGesturesManager |
getGesturesManager() |
|
float |
getHeight() |
Returns the measured height of the Map.
|
TrimbleMapsMap.InfoWindowAdapter |
getInfoWindowAdapter() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
LatLngBoundsZoom |
getLatLngBoundsZoomFromCamera(CameraPosition camera) |
Get the LatLngBoundsZoom from a given CameraPosition.
|
LocationComponent |
getLocationComponent() |
Returns the
LocationComponent that can be used to display user's location on the map. |
java.util.List<Marker> |
getMarkers() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
double |
getMaxPitch() |
Gets the maximum Pitch the map can be displayed at.
|
double |
getMaxZoomLevel() |
Gets the maximum zoom level the map can be displayed at.
|
double |
getMinPitch() |
Gets the minimum Pitch the map can be displayed at.
|
double |
getMinZoomLevel() |
Gets the minimum zoom level the map can be displayed at.
|
TrimbleMapsMap.OnInfoWindowClickListener |
getOnInfoWindowClickListener() |
Return the InfoWindow click listener
|
TrimbleMapsMap.OnInfoWindowCloseListener |
getOnInfoWindowCloseListener() |
Return the InfoWindow close listener
|
TrimbleMapsMap.OnInfoWindowLongClickListener |
getOnInfoWindowLongClickListener() |
Return the InfoWindow long click listener
|
int[] |
getPadding() |
Deprecated.
Use
CameraPosition.padding instead. |
java.util.List<Polygon> |
getPolygons() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
java.util.List<Polyline> |
getPolylines() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
boolean |
getPrefetchesTiles() |
Deprecated.
Use
getPrefetchZoomDelta() instead. |
int |
getPrefetchZoomDelta() |
Check current pre-fetching zoom delta.
|
Projection |
getProjection() |
Get the Projection object that you can use to convert between screen coordinates and latitude/longitude
coordinates.
|
java.util.List<Marker> |
getSelectedMarkers() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
Style |
getStyle() |
Get the Style of the map.
|
void |
getStyle(Style.OnStyleLoaded onStyleLoaded) |
Get the Style of the map asynchronously.
|
UiSettings |
getUiSettings() |
Gets the user interface settings for the map.
|
float |
getWidth() |
Returns the measured width of the Map.
|
boolean |
is3dBuildingVisible() |
|
boolean |
isAddressVisible() |
|
boolean |
isAllowConcurrentMultipleOpenInfoWindows() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
boolean |
isDebugActive() |
Returns whether the map debug information is currently shown.
|
boolean |
isPoiVisible() |
|
boolean |
isRoadSurfaceVisible() |
|
boolean |
isTrafficVisible() |
|
boolean |
isUserAnimationInProgress() |
Check if the animation is currently performed by the user (e.g.
|
boolean |
isWeatherAlertVisible() |
|
boolean |
isWeatherRadarVisible() |
|
void |
moveCamera(CameraUpdate update) |
Repositions the camera according to the instructions defined in the update.
|
void |
moveCamera(CameraUpdate update,
TrimbleMapsMap.CancelableCallback callback) |
Repositions the camera according to the instructions defined in the update.
|
java.util.List<com.trimblemaps.geojson.Feature> |
queryRenderedFeatures(android.graphics.PointF coordinates,
Expression filter,
java.lang.String... layerIds) |
Queries the map for rendered features
|
java.util.List<com.trimblemaps.geojson.Feature> |
queryRenderedFeatures(android.graphics.PointF coordinates,
java.lang.String... layerIds) |
Queries the map for rendered features.
|
java.util.List<com.trimblemaps.geojson.Feature> |
queryRenderedFeatures(android.graphics.RectF coordinates,
Expression filter,
java.lang.String... layerIds) |
Queries the map for rendered features
|
java.util.List<com.trimblemaps.geojson.Feature> |
queryRenderedFeatures(android.graphics.RectF coordinates,
java.lang.String... layerIds) |
Queries the map for rendered features
|
void |
removeAnnotation(long id) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
removeAnnotation(Annotation annotation) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
removeAnnotations() |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
removeAnnotations(java.util.List<? extends Annotation> annotationList) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
removeMarker(Marker marker) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
removeOnCameraIdleListener(TrimbleMapsMap.OnCameraIdleListener listener) |
Removes a callback that is invoked when camera movement has ended.
|
void |
removeOnCameraMoveCancelListener(TrimbleMapsMap.OnCameraMoveCanceledListener listener) |
Removes a callback that is invoked when camera movement was cancelled.
|
void |
removeOnCameraMoveListener(TrimbleMapsMap.OnCameraMoveListener listener) |
Removes a callback that is invoked when camera position changes.
|
void |
removeOnCameraMoveStartedListener(TrimbleMapsMap.OnCameraMoveStartedListener listener) |
Removes a callback that is invoked when camera movement has started.
|
void |
removeOnFlingListener(TrimbleMapsMap.OnFlingListener listener) |
Removes a callback that's invoked when the map is flinged.
|
void |
removeOnMapClickListener(TrimbleMapsMap.OnMapClickListener listener) |
Removes a callback that's invoked when the user clicks on the map view.
|
void |
removeOnMapLongClickListener(TrimbleMapsMap.OnMapLongClickListener listener) |
Removes a callback that's invoked when the user long clicks on the map view.
|
void |
removeOnMoveListener(TrimbleMapsMap.OnMoveListener listener) |
Removes a callback that's invoked when the map is moved.
|
void |
removeOnRotateListener(TrimbleMapsMap.OnRotateListener listener) |
Removes a callback that's invoked when the map is rotated.
|
void |
removeOnScaleListener(TrimbleMapsMap.OnScaleListener listener) |
Removes a callback that's invoked when the map is scaled.
|
void |
removeOnShoveListener(TrimbleMapsMap.OnShoveListener listener) |
Remove a callback that's invoked when the map is tilted.
|
void |
removePolygon(Polygon polygon) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
removePolyline(Polyline polyline) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
resetNorth() |
Resets the map view to face north.
|
void |
scrollBy(float x,
float y) |
Scrolls the camera over the map, shifting the center of view by the specified number of pixels in the x and y
directions.
|
void |
scrollBy(float x,
float y,
long duration) |
Scrolls the camera over the map, shifting the center of view by the specified number of pixels in the x and y
directions.
|
void |
selectMarker(Marker marker) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
set3dBuildingVisibility(boolean isVisible) |
|
void |
setAddressVisibility(boolean isVisible) |
|
void |
setAllowConcurrentMultipleOpenInfoWindows(boolean allow) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
setCameraPosition(CameraPosition cameraPosition) |
Repositions the camera according to the cameraPosition.
|
void |
setDebugActive(boolean debugActive) |
Changes whether the map debug information is shown.
|
void |
setFocalBearing(double bearing,
float focalX,
float focalY,
long duration) |
Transform the map bearing given a bearing, focal point coordinates, and a duration.
|
void |
setGesturesManager(com.trimblemaps.android.gestures.AndroidGesturesManager androidGesturesManager,
boolean attachDefaultListeners,
boolean setDefaultMutuallyExclusives) |
|
void |
setInfoWindowAdapter(TrimbleMapsMap.InfoWindowAdapter infoWindowAdapter) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
setLatLngBoundsForCameraTarget(LatLngBounds latLngBounds) |
Sets a LatLngBounds that constraints map transformations to this bounds.
|
void |
setMaxPitchPreference(double maxPitch) |
Sets the maximum Pitch the map can be displayed at.
|
void |
setMaxZoomPreference(double maxZoom) |
Sets the maximum zoom level the map can be displayed at.
|
void |
setMinPitchPreference(double minPitch) |
Sets the minimum Pitch the map can be displayed at.
|
void |
setMinZoomPreference(double minZoom) |
Sets the minimum zoom level the map can be displayed at.
|
void |
setOfflineRegionDefinition(OfflineRegionDefinition definition) |
Loads a new style from the specified offline region definition and moves the map camera to that region.
|
void |
setOfflineRegionDefinition(OfflineRegionDefinition definition,
Style.OnStyleLoaded callback) |
Loads a new style from the specified offline region definition and moves the map camera to that region.
|
void |
setOnFpsChangedListener(TrimbleMapsMap.OnFpsChangedListener listener) |
Sets a callback that's invoked on every frame rendered to the map view.
|
void |
setOnInfoWindowClickListener(TrimbleMapsMap.OnInfoWindowClickListener listener) |
Sets a callback that's invoked when the user clicks on an info window.
|
void |
setOnInfoWindowCloseListener(TrimbleMapsMap.OnInfoWindowCloseListener listener) |
Set an callback to be invoked when an InfoWindow closes.
|
void |
setOnInfoWindowLongClickListener(TrimbleMapsMap.OnInfoWindowLongClickListener listener) |
Sets a callback that's invoked when a marker's info window is long pressed.
|
void |
setOnMarkerClickListener(TrimbleMapsMap.OnMarkerClickListener listener) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
setOnPolygonClickListener(TrimbleMapsMap.OnPolygonClickListener listener) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
setOnPolylineClickListener(TrimbleMapsMap.OnPolylineClickListener listener) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
setPadding(int left,
int top,
int right,
int bottom) |
|
void |
setPoiVisibility(boolean isVisible) |
|
void |
setPrefetchesTiles(boolean enable) |
Deprecated.
Use
setPrefetchZoomDelta(int) instead. |
void |
setPrefetchZoomDelta(int delta) |
Set the tile pre-fetching zoom delta.
|
void |
setRoadSurfaceVisibility(boolean isVisible) |
|
void |
setStyle(Style.Builder builder) |
Loads a new map style from the specified builder.
|
void |
setStyle(Style.Builder builder,
Style.OnStyleLoaded callback) |
Loads a new map style from the specified builder.
|
void |
setStyle(java.lang.String style) |
Loads a new map style from the specified bundled style.
|
void |
setStyle(java.lang.String style,
Style.OnStyleLoaded callback) |
Loads a new map style from the specified bundled style.
|
void |
setTrafficVisibility(boolean isVisible) |
|
void |
setUserAnimationInProgress(boolean inProgress) |
Tells the map rendering engine that the animation is currently performed by the
user (e.g.
|
void |
setWeatherAlertVisibility(boolean isVisible) |
|
void |
setWeatherRadarVisibility(boolean isVisible) |
|
void |
snapshot(TrimbleMapsMap.SnapshotReadyCallback callback) |
Takes a snapshot of the map.
|
void |
toggle3dBuildingVisibility() |
|
void |
toggleAddressVisibility() |
|
void |
togglePoiVisibility() |
|
void |
toggleRoadSurfaceVisibility() |
|
void |
toggleTrafficVisibility() |
|
void |
toggleWeatherAlertVisibility() |
|
void |
toggleWeatherRadarVisibility() |
|
void |
triggerRepaint() |
Trigger the mapview to repaint.
|
void |
updateMarker(Marker updatedMarker) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
updatePolygon(Polygon polygon) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
void |
updatePolyline(Polyline polyline) |
Deprecated.
As of 7.0.0,
use
TrimbleMaps Annotation Plugin instead
|
public void triggerRepaint()
public void getStyle(@NonNull Style.OnStyleLoaded onStyleLoaded)
@Nullable public Style getStyle()
Returns null when style is being loaded.
@Deprecated public void setPrefetchesTiles(boolean enable)
setPrefetchZoomDelta(int)
instead.enable
- true to enable@Deprecated public boolean getPrefetchesTiles()
getPrefetchZoomDelta()
instead.setPrefetchesTiles(boolean)
public void setPrefetchZoomDelta(int delta)
delta
- zoom deltapublic int getPrefetchZoomDelta()
setPrefetchZoomDelta(int)
public void setMinZoomPreference(double minZoom)
Sets the minimum zoom level the map can be displayed at.
minZoom
- The new minimum zoom level.public double getMinZoomLevel()
Gets the minimum zoom level the map can be displayed at.
public void setMaxZoomPreference(double maxZoom)
Sets the maximum zoom level the map can be displayed at.
The default maximum zoomn level is 22. The upper bound for this value is 25.5.
maxZoom
- The new maximum zoom level.public double getMaxZoomLevel()
Gets the maximum zoom level the map can be displayed at.
public void setMinPitchPreference(double minPitch)
Sets the minimum Pitch the map can be displayed at.
The default and lower bound for minPitch Pitch is 0.
minPitch
- The new minimum Pitch.public double getMinPitch()
Gets the minimum Pitch the map can be displayed at.
public void setMaxPitchPreference(double maxPitch)
Sets the maximum Pitch the map can be displayed at.
The default and upper bound for maximum Pitch is 60.
maxPitch
- The new maximum Pitch.public double getMaxPitch()
Gets the maximum Pitch the map can be displayed at.
@NonNull public UiSettings getUiSettings()
@NonNull public Projection getProjection()
public void cancelTransitions()
This invokes the TrimbleMapsMap.CancelableCallback
for ongoing camera updates.
@NonNull public final CameraPosition getCameraPosition()
public void setCameraPosition(@NonNull CameraPosition cameraPosition)
cameraPosition
- the camera position to setpublic final void moveCamera(@NonNull CameraUpdate update)
update
- The change that should be applied to the camera.public final void moveCamera(@NonNull CameraUpdate update, @Nullable TrimbleMapsMap.CancelableCallback callback)
update
- The change that should be applied to the cameracallback
- the callback to be invoked when an animation finishes or is canceledpublic final void easeCamera(@NonNull CameraUpdate update)
CameraUpdate
. If getCameraPosition()
is called during the animation,
it will return the current location of the camera in flight.update
- The change that should be applied to the camera.for a set of updates.
public final void easeCamera(@NonNull CameraUpdate update, @Nullable TrimbleMapsMap.CancelableCallback callback)
CameraUpdate
. If getCameraPosition()
is called during the animation,
it will return the current location of the camera in flight.update
- The change that should be applied to the camera.callback
- An optional callback to be notified from the main thread when the animation
stops. If the animation stops due to its natural completion, the callback
will be notified with onFinish(). If the animation stops due to interruption
by a later camera movement or a user gesture, onCancel() will be called.
Do not update or ease the camera from within onCancel().for a set of updates.
public final void easeCamera(@NonNull CameraUpdate update, int durationMs)
CameraUpdate
. If getCameraPosition()
is called
during the animation, it will return the current location of the camera in flight.update
- The change that should be applied to the camera.durationMs
- The duration of the animation in milliseconds. This must be strictly
positive, otherwise an IllegalArgumentException will be thrown.for a set of updates.
public final void easeCamera(@NonNull CameraUpdate update, int durationMs, @Nullable TrimbleMapsMap.CancelableCallback callback)
CameraUpdate
. A callback can be used to be notified when
easing the camera stops. If getCameraPosition()
is called during the animation, it
will return the current location of the camera in flight.
Note that this will cancel location tracking mode if enabled.
update
- The change that should be applied to the camera.durationMs
- The duration of the animation in milliseconds. This must be strictly
positive, otherwise an IllegalArgumentException will be thrown.callback
- An optional callback to be notified from the main thread when the animation
stops. If the animation stops due to its natural completion, the callback
will be notified with onFinish(). If the animation stops due to interruption
by a later camera movement or a user gesture, onCancel() will be called.
Do not update or ease the camera from within onCancel().for a set of updates.
public final void easeCamera(@NonNull CameraUpdate update, int durationMs, boolean easingInterpolator)
CameraUpdate
. A callback can be used to be notified when
easing the camera stops. If getCameraPosition()
is called during the animation, it
will return the current location of the camera in flight.
Note that this will cancel location tracking mode if enabled.
update
- The change that should be applied to the camera.durationMs
- The duration of the animation in milliseconds. This must be strictly
positive, otherwise an IllegalArgumentException will be thrown.easingInterpolator
- True for easing interpolator, false for linear.public final void easeCamera(@NonNull CameraUpdate update, int durationMs, boolean easingInterpolator, @Nullable TrimbleMapsMap.CancelableCallback callback)
CameraUpdate
. A callback can be used to be notified when
easing the camera stops. If getCameraPosition()
is called during the animation, it
will return the current location of the camera in flight.update
- The change that should be applied to the camera.durationMs
- The duration of the animation in milliseconds. This must be strictly
positive, otherwise an IllegalArgumentException will be thrown.easingInterpolator
- True for easing interpolator, false for linear.callback
- An optional callback to be notified from the main thread when the animation
stops. If the animation stops due to its natural completion, the callback
will be notified with onFinish(). If the animation stops due to interruption
by a later camera movement or a user gesture, onCancel() will be called.
Do not update or ease the camera from within onCancel().public final void animateCamera(@NonNull CameraUpdate update)
CameraUpdate
using a transition
animation that evokes powered flight. The animation will last the default amount of time.
During the animation, a call to getCameraPosition()
returns an intermediate location
of the camera in flight.update
- The change that should be applied to the camera.for a set of updates.
public final void animateCamera(@NonNull CameraUpdate update, @Nullable TrimbleMapsMap.CancelableCallback callback)
CameraUpdate
using a transition
animation that evokes powered flight. The animation will last the default amount of time. A
callback can be used to be notified when animating the camera stops. During the animation, a
call to getCameraPosition()
returns an intermediate location of the camera in flight.update
- The change that should be applied to the camera.callback
- The callback to invoke from the main thread when the animation stops. If the
animation completes normally, onFinish() is called; otherwise, onCancel() is
called. Do not update or animate the camera from within onCancel().for a set of updates.
public final void animateCamera(@NonNull CameraUpdate update, int durationMs)
CameraUpdate
using a transition
animation that evokes powered flight. The animation will last a specified amount of time
given in milliseconds. During the animation, a call to getCameraPosition()
returns
an intermediate location of the camera in flight.update
- The change that should be applied to the camera.durationMs
- The duration of the animation in milliseconds. This must be strictly
positive, otherwise an IllegalArgumentException will be thrown.for a set of updates.
public final void animateCamera(@NonNull CameraUpdate update, int durationMs, @Nullable TrimbleMapsMap.CancelableCallback callback)
CameraUpdate
using a transition
animation that evokes powered flight. The animation will last a specified amount of time
given in milliseconds. A callback can be used to be notified when animating the camera stops.
During the animation, a call to getCameraPosition()
returns an intermediate location
of the camera in flight.update
- The change that should be applied to the camera.durationMs
- The duration of the animation in milliseconds. This must be strictly
positive, otherwise an IllegalArgumentException will be thrown.callback
- An optional callback to be notified from the main thread when the animation
stops. If the animation stops due to its natural completion, the callback
will be notified with onFinish(). If the animation stops due to interruption
by a later camera movement or a user gesture, onCancel() will be called.
Do not update or animate the camera from within onCancel(). If a callback
isn't required, leave it as null.for a set of updates.
public void scrollBy(float x, float y)
x
- Amount of pixels to scroll to in x directiony
- Amount of pixels to scroll to in y directionpublic void scrollBy(float x, float y, long duration)
x
- Amount of pixels to scroll to in x directiony
- Amount of pixels to scroll to in y directionduration
- Amount of time the scrolling should takepublic void resetNorth()
public void setFocalBearing(double bearing, float focalX, float focalY, long duration)
bearing
- The bearing of the Map to be transformed tofocalX
- The x coordinate of the focal pointfocalY
- The y coordinate of the focal pointduration
- The duration of the transformationpublic float getHeight()
public float getWidth()
public void setOfflineRegionDefinition(@NonNull OfflineRegionDefinition definition)
definition
- the offline region definitionOfflineRegionDefinition
public void setOfflineRegionDefinition(@NonNull OfflineRegionDefinition definition, @Nullable Style.OnStyleLoaded callback)
definition
- the offline region definitioncallback
- the callback to be invoked when the style has loadedOfflineRegionDefinition
public boolean isDebugActive()
public void setDebugActive(boolean debugActive)
Changes whether the map debug information is shown.
The default value is false.debugActive
- If true, map debug information is shown.@Deprecated public void cycleDebugOptions()
setDebugActive(boolean)
Cycles through the map debug options.
The value of isDebugActive reflects whether there are any map debug options enabled or disabled.isDebugActive()
public void setStyle(java.lang.String style)
This method is asynchronous and will return before the style finishes loading.
If you wish to wait for the map to finish loading, listen to the MapView.OnDidFinishLoadingStyleListener
callback or use the setStyle(String, Style.OnStyleLoaded)
method instead.
MapView.OnDidFailLoadingMapListener
callback
will be triggered.style
- The bundled styleStyle
public void setStyle(java.lang.String style, Style.OnStyleLoaded callback)
If the style fails to load or an invalid style URL is set, the map view will become blank.
An error message will be logged in the Android logcat and MapView.OnDidFailLoadingMapListener
callback
will be triggered.
style
- The bundled stylecallback
- The callback to be invoked when the style has loadedStyle
public void setStyle(Style.Builder builder)
If the builder fails to load, the map view will become blank. An error message will be logged in the Android logcat
and MapView.OnDidFailLoadingMapListener
callback will be triggered. If you wish to wait for the map to
finish loading, listen to the MapView.OnDidFinishLoadingStyleListener
callback or use the
setStyle(String, Style.OnStyleLoaded)
instead.
builder
- The style builderStyle
public void setStyle(Style.Builder builder, Style.OnStyleLoaded callback)
If the builder fails to load, the map view will become blank. An error message will be logged in the Android logcat
and MapView.OnDidFailLoadingMapListener
callback will be triggered.
builder
- The style buildercallback
- The callback to be invoked when the style has loadedStyle
public boolean isTrafficVisible()
public void setTrafficVisibility(boolean isVisible)
public void toggleTrafficVisibility()
public boolean isWeatherAlertVisible()
public void setWeatherAlertVisibility(boolean isVisible)
public void toggleWeatherAlertVisibility()
public boolean isWeatherRadarVisible()
public void setWeatherRadarVisibility(boolean isVisible)
public void toggleWeatherRadarVisibility()
public boolean isRoadSurfaceVisible()
public void setRoadSurfaceVisibility(boolean isVisible)
public void toggleRoadSurfaceVisibility()
public boolean is3dBuildingVisible()
public void set3dBuildingVisibility(boolean isVisible)
public void toggle3dBuildingVisibility()
public boolean isPoiVisible()
public void setPoiVisibility(boolean isVisible)
public void togglePoiVisibility()
public boolean isAddressVisible()
public void setAddressVisibility(boolean isVisible)
public void toggleAddressVisibility()
@Deprecated @NonNull public Marker addMarker(@NonNull MarkerOptions markerOptions)
Adds a marker to this map.
The marker's icon is rendered on the map at the locationMarker.position
.
If Marker.title
is defined, the map shows an info box with the marker's title and snippet.markerOptions
- A marker options object that defines how to render the markerMarker
that was added to the map@Deprecated @NonNull public Marker addMarker(@NonNull BaseMarkerOptions markerOptions)
Adds a marker to this map.
The marker's icon is rendered on the map at the locationMarker.position
.
If Marker.title
is defined, the map shows an info box with the marker's title and snippet.markerOptions
- A marker options object that defines how to render the markerMarker
that was added to the map@Deprecated @NonNull public java.util.List<Marker> addMarkers(@NonNull java.util.List<? extends BaseMarkerOptions> markerOptionsList)
Adds multiple markers to this map.
The marker's icon is rendered on the map at the locationMarker.position
.
If Marker.title
is defined, the map shows an info box with the marker's title and snippet.markerOptionsList
- A list of marker options objects that defines how to render the markersMarker
s that were added to the map@Deprecated public void updateMarker(@NonNull Marker updatedMarker)
Updates a marker on this map. Does nothing if the marker isn't already added.
updatedMarker
- An updated marker object@Deprecated @NonNull public Polyline addPolyline(@NonNull PolylineOptions polylineOptions)
polylineOptions
- A polyline options object that defines how to render the polylinePolyline
that was added to the map@Deprecated @NonNull public java.util.List<Polyline> addPolylines(@NonNull java.util.List<PolylineOptions> polylineOptionsList)
polylineOptionsList
- A list of polyline options objects that defines how to render the polylines.Polyline
s that were added to the map.@Deprecated public void updatePolyline(@NonNull Polyline polyline)
polyline
- An updated polyline object.@Deprecated @NonNull public Polygon addPolygon(@NonNull PolygonOptions polygonOptions)
polygonOptions
- A polygon options object that defines how to render the polygon.Polygon
that was added to the map.@Deprecated @NonNull public java.util.List<Polygon> addPolygons(@NonNull java.util.List<PolygonOptions> polygonOptionsList)
polygonOptionsList
- A list of polygon options objects that defines how to render the polygonsPolygon
s that were added to the map@Deprecated public void updatePolygon(@NonNull Polygon polygon)
polygon
- An updated polygon object@Deprecated public void removeMarker(@NonNull Marker marker)
Convenience method for removing a Marker from the map.
Calls removeAnnotation() internally.marker
- Marker to remove@Deprecated public void removePolyline(@NonNull Polyline polyline)
Convenience method for removing a Polyline from the map.
Calls removeAnnotation() internally.polyline
- Polyline to remove@Deprecated public void removePolygon(@NonNull Polygon polygon)
Convenience method for removing a Polygon from the map.
Calls removeAnnotation() internally.polygon
- Polygon to remove@Deprecated public void removeAnnotation(@NonNull Annotation annotation)
annotation
- The annotation object to remove.@Deprecated public void removeAnnotation(long id)
id
- The identifier associated to the annotation to be removed@Deprecated public void removeAnnotations(@NonNull java.util.List<? extends Annotation> annotationList)
annotationList
- A list of annotation objects to remove.@Deprecated public void removeAnnotations()
@Deprecated public void clear()
@Deprecated @Nullable public Annotation getAnnotation(long id)
id
- the id used to look up an annotation@Deprecated @NonNull public java.util.List<Annotation> getAnnotations()
@Deprecated @NonNull public java.util.List<Marker> getMarkers()
@Deprecated @NonNull public java.util.List<Polygon> getPolygons()
@Deprecated @NonNull public java.util.List<Polyline> getPolylines()
@Deprecated public void setOnMarkerClickListener(@Nullable TrimbleMapsMap.OnMarkerClickListener listener)
listener
- The callback that's invoked when the user clicks on a marker.
To unset the callback, use null.@Deprecated public void setOnPolygonClickListener(@Nullable TrimbleMapsMap.OnPolygonClickListener listener)
listener
- The callback that's invoked when the user clicks on a polygon.
To unset the callback, use null.@Deprecated public void setOnPolylineClickListener(@Nullable TrimbleMapsMap.OnPolylineClickListener listener)
listener
- The callback that's invoked when the user clicks on a polyline.
To unset the callback, use null.@Deprecated public void selectMarker(@NonNull Marker marker)
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.
Selecting an already selected marker will have no effect.marker
- The marker to select.@Deprecated public void deselectMarkers()
@Deprecated public void deselectMarker(@NonNull Marker marker)
marker
- the marker to deselect@Deprecated @NonNull public java.util.List<Marker> getSelectedMarkers()
@Deprecated public void setInfoWindowAdapter(@Nullable TrimbleMapsMap.InfoWindowAdapter infoWindowAdapter)
Sets a custom renderer for the contents of info window.
When set your callback is invoked when an info window is about to be shown. By returning a customView
, the default info window will be replaced.infoWindowAdapter
- The callback to be invoked when an info window will be shown.
To unset the callback, use null.@Deprecated @Nullable public TrimbleMapsMap.InfoWindowAdapter getInfoWindowAdapter()
@Deprecated public void setAllowConcurrentMultipleOpenInfoWindows(boolean allow)
allow
- If true, map allows concurrent multiple infowindows to be shown.@Deprecated public boolean isAllowConcurrentMultipleOpenInfoWindows()
public LatLngBoundsZoom getLatLngBoundsZoomFromCamera(@NonNull CameraPosition camera)
camera
- the input camera positionpublic void setLatLngBoundsForCameraTarget(@Nullable LatLngBounds latLngBounds)
Set to null to clear current bounds, newly set bounds will override previously set bounds.
latLngBounds
- the bounds to constrain the map with@Nullable public CameraPosition getCameraForLatLngBounds(@NonNull LatLngBounds latLngBounds)
latLngBounds
- the bounds to set the map with@Nullable public CameraPosition getCameraForLatLngBounds(@NonNull LatLngBounds latLngBounds, @NonNull int[] padding)
latLngBounds
- the bounds to set the map withpadding
- the padding to apply to the bounds@Nullable public CameraPosition getCameraForLatLngBounds(@NonNull LatLngBounds latLngBounds, double bearing, double tilt)
latLngBounds
- the bounds to set the map withbearing
- the bearing to transform the camera position withtilt
- to transform the camera position with@Nullable public CameraPosition getCameraForLatLngBounds(@NonNull LatLngBounds latLngBounds, @NonNull int[] padding, double bearing, double tilt)
latLngBounds
- the bounds to set the map withpadding
- the padding to apply to the boundsbearing
- the bearing to transform the camera position withtilt
- to transform the camera position with@Nullable public CameraPosition getCameraForGeometry(@NonNull com.trimblemaps.geojson.Geometry geometry)
geometry
- the geometry to wraps the map with@Nullable public CameraPosition getCameraForGeometry(@NonNull com.trimblemaps.geojson.Geometry geometry, @NonNull int[] padding)
geometry
- the geometry to wraps the map withpadding
- the padding to apply to the bounds@Nullable public CameraPosition getCameraForGeometry(@NonNull com.trimblemaps.geojson.Geometry geometry, double bearing, double tilt)
geometry
- the geometry to wraps the map withbearing
- the bearing at which to compute the geometry's boundstilt
- the tilt at which to compute the geometry's bounds@Nullable public CameraPosition getCameraForGeometry(@NonNull com.trimblemaps.geojson.Geometry geometry, @NonNull int[] padding, double bearing, double tilt)
geometry
- the geometry to wraps the map withpadding
- the padding to apply to the boundsbearing
- the bearing at which to compute the geometry's boundstilt
- the tilt at which to compute the geometry's bounds@Deprecated public void setPadding(int left, int top, int right, int bottom)
CameraPosition.Builder.padding(double, double, double, double)
or CameraUpdateFactory.paddingTo(double, double, double, double)
instead.Sets the distance from the edges of the map view's frame to the edges of the map view's logical viewport.
When the value of this property is equal to {0,0,0,0}, viewport properties such as 'centerCoordinate' assume a viewport that matches the map view's frame. Otherwise, those properties are inset, excluding part of the frame from the viewport. For instance, if the only the top edge is inset, the map center is effectively shifted downward.
This method sets the padding "lazily".
This means that the padding is going to be applied with the next camera transformation.
To apply the padding immediately use CameraPosition.Builder.padding(double, double, double, double)
or CameraUpdateFactory.paddingTo(double, double, double, double)
.
left
- The left margin in pixels.top
- The top margin in pixels.right
- The right margin in pixels.bottom
- The bottom margin in pixels.@Deprecated @NonNull public int[] getPadding()
CameraPosition.padding
instead.setPadding(int, int, int, int)
.public void addOnCameraIdleListener(@NonNull TrimbleMapsMap.OnCameraIdleListener listener)
listener
- the listener to notifypublic void removeOnCameraIdleListener(@NonNull TrimbleMapsMap.OnCameraIdleListener listener)
listener
- the listener to removepublic void addOnCameraMoveCancelListener(@NonNull TrimbleMapsMap.OnCameraMoveCanceledListener listener)
listener
- the listener to notifypublic void removeOnCameraMoveCancelListener(@NonNull TrimbleMapsMap.OnCameraMoveCanceledListener listener)
listener
- the listener to removepublic void addOnCameraMoveStartedListener(@NonNull TrimbleMapsMap.OnCameraMoveStartedListener listener)
listener
- the listener to notifypublic void removeOnCameraMoveStartedListener(@NonNull TrimbleMapsMap.OnCameraMoveStartedListener listener)
listener
- the listener to removepublic void addOnCameraMoveListener(@NonNull TrimbleMapsMap.OnCameraMoveListener listener)
listener
- the listener to notifypublic void removeOnCameraMoveListener(@NonNull TrimbleMapsMap.OnCameraMoveListener listener)
listener
- the listener to removepublic void setOnFpsChangedListener(@Nullable TrimbleMapsMap.OnFpsChangedListener listener)
listener
- The callback that's invoked on every frame rendered to the map view.
To unset the callback, use null.public void addOnFlingListener(@NonNull TrimbleMapsMap.OnFlingListener listener)
listener
- The callback that's invoked when the map is flinged.public void removeOnFlingListener(@NonNull TrimbleMapsMap.OnFlingListener listener)
listener
- The callback that's invoked when the map is flinged.public void addOnMoveListener(@NonNull TrimbleMapsMap.OnMoveListener listener)
listener
- The callback that's invoked when the map is moved.public void removeOnMoveListener(@NonNull TrimbleMapsMap.OnMoveListener listener)
listener
- The callback that's invoked when the map is moved.public void addOnRotateListener(@NonNull TrimbleMapsMap.OnRotateListener listener)
listener
- The callback that's invoked when the map is rotated.public void removeOnRotateListener(@NonNull TrimbleMapsMap.OnRotateListener listener)
listener
- The callback that's invoked when the map is rotated.public void addOnScaleListener(@NonNull TrimbleMapsMap.OnScaleListener listener)
listener
- The callback that's invoked when the map is scaled.public void removeOnScaleListener(@NonNull TrimbleMapsMap.OnScaleListener listener)
listener
- The callback that's invoked when the map is scaled.public void addOnShoveListener(@NonNull TrimbleMapsMap.OnShoveListener listener)
listener
- The callback that's invoked when the map is tilted.public void removeOnShoveListener(@NonNull TrimbleMapsMap.OnShoveListener listener)
listener
- The callback that's invoked when the map is tilted.public void setGesturesManager(@NonNull com.trimblemaps.android.gestures.AndroidGesturesManager androidGesturesManager, boolean attachDefaultListeners, boolean setDefaultMutuallyExclusives)
androidGesturesManager
- Gestures manager that interprets gestures based on the motion events.attachDefaultListeners
- If true, predefined listeners will be attach
to change map based on AndroidGesturesManager
callbacks.setDefaultMutuallyExclusives
- If true, predefined mutually exclusive gesture sets
will be added to the passed gestures manager.@NonNull public com.trimblemaps.android.gestures.AndroidGesturesManager getGesturesManager()
public void cancelAllVelocityAnimations()
public void addOnMapClickListener(@NonNull TrimbleMapsMap.OnMapClickListener listener)
listener
- The callback that's invoked when the user clicks on the map view.public void removeOnMapClickListener(@NonNull TrimbleMapsMap.OnMapClickListener listener)
listener
- The callback that's invoked when the user clicks on the map view.public void addOnMapLongClickListener(@NonNull TrimbleMapsMap.OnMapLongClickListener listener)
listener
- The callback that's invoked when the user long clicks on the map view.public void removeOnMapLongClickListener(@NonNull TrimbleMapsMap.OnMapLongClickListener listener)
listener
- The callback that's invoked when the user long clicks on the map view.public void setOnInfoWindowClickListener(@Nullable TrimbleMapsMap.OnInfoWindowClickListener listener)
listener
- The callback that's invoked when the user clicks on an info window.
To unset the callback, use null.@Nullable public TrimbleMapsMap.OnInfoWindowClickListener getOnInfoWindowClickListener()
public void setOnInfoWindowLongClickListener(@Nullable TrimbleMapsMap.OnInfoWindowLongClickListener listener)
listener
- The callback that's invoked when a marker's info window is long pressed. To unset the callback,
use null.@Nullable public TrimbleMapsMap.OnInfoWindowLongClickListener getOnInfoWindowLongClickListener()
public void setOnInfoWindowCloseListener(@Nullable TrimbleMapsMap.OnInfoWindowCloseListener listener)
listener
- callback invoked when an InfoWindow closes@Nullable public TrimbleMapsMap.OnInfoWindowCloseListener getOnInfoWindowCloseListener()
public void snapshot(@NonNull TrimbleMapsMap.SnapshotReadyCallback callback)
callback
- Callback method invoked when the snapshot is taken.@NonNull public java.util.List<com.trimblemaps.geojson.Feature> queryRenderedFeatures(@NonNull android.graphics.PointF coordinates, @Nullable java.lang.String... layerIds)
Returns an empty list if either the map or underlying render surface has been destroyed.
coordinates
- the point to querylayerIds
- optionally - only query these layers@NonNull public java.util.List<com.trimblemaps.geojson.Feature> queryRenderedFeatures(@NonNull android.graphics.PointF coordinates, @Nullable Expression filter, @Nullable java.lang.String... layerIds)
Returns an empty list if either the map or underlying render surface has been destroyed.
coordinates
- the point to queryfilter
- filters the returned features with an expressionlayerIds
- optionally - only query these layers@NonNull public java.util.List<com.trimblemaps.geojson.Feature> queryRenderedFeatures(@NonNull android.graphics.RectF coordinates, @Nullable java.lang.String... layerIds)
Returns an empty list if either the map or underlying render surface has been destroyed.
coordinates
- the box to querylayerIds
- optionally - only query these layers@NonNull public java.util.List<com.trimblemaps.geojson.Feature> queryRenderedFeatures(@NonNull android.graphics.RectF coordinates, @Nullable Expression filter, @Nullable java.lang.String... layerIds)
Returns an empty list if either the map or underlying render surface has been destroyed.
coordinates
- the box to queryfilter
- filters the returned features with an expressionlayerIds
- optionally - only query these layers@NonNull public LocationComponent getLocationComponent()
LocationComponent
that can be used to display user's location on the map.
Use LocationComponent.activateLocationComponent(Context, Style)
or any overload to activate the component,
then, enable it with LocationComponent.setLocationComponentEnabled(boolean)
.
You can customize the location icon and more with LocationComponentOptions
.
public void setUserAnimationInProgress(boolean inProgress)
inProgress
- Bool representing if user animation is in progresspublic boolean isUserAnimationInProgress()