Class Marker
java.lang.Object
com.trimblemaps.mapsdk.annotations.Annotation
com.trimblemaps.mapsdk.annotations.Marker
- All Implemented Interfaces:
Comparable<Annotation>
Deprecated.
Use TrimbleMaps Annotation Plugin instead
Marker is an annotation that shows an icon image at a geographical location. The default marker
uses a provided icon. This icon can be customized using
IconFactory to generate an
Icon using a provided image. Markers are added to the map by first giving a
LatLng and using TrimbleMapsMap.addMarker(MarkerOptions). The marker icon will be
centered at this position so it is common to add padding to the icon image before usage.
Markers are designed to be interactive. They receive click events by default, and are often used
with event listeners to bring up info windows. An InfoWindow is displayed by default when
either a title or snippet is provided.
-
Field Summary
Fields inherited from class com.trimblemaps.mapsdk.annotations.Annotation
mapView, trimbleMapsMap -
Constructor Summary
ConstructorsConstructorDescriptionMarker(BaseMarkerOptions baseMarkerOptions) Deprecated.Creates a instance ofMarkerusing the builder of Marker. -
Method Summary
Modifier and TypeMethodDescriptiongetIcon()Deprecated.Gets theIconcurrently used for the marker.Deprecated.Gets theInfoWindowthe marker is using.com.trimblemaps.mapsdk.geometry.LatLngDeprecated.Returns the position of the marker.Deprecated.Gets the snippet of the marker.getTitle()Deprecated.Gets the snippet of the marker.voidDeprecated.Do not use this method, used internally by the SDK.booleanDeprecated.Do not use this method, used internally by the SDK.voidDeprecated.Sets the icon of the marker.voidsetPosition(com.trimblemaps.mapsdk.geometry.LatLng position) Deprecated.Sets the location of the marker.voidsetRightOffsetPixels(int rightOffsetPixels) Deprecated.Do not use this method, used internally by the SDK.voidsetSnippet(String snippet) Deprecated.Sets the snippet of the marker.voidDeprecated.Sets the title of the marker.voidsetTopOffsetPixels(int topOffsetPixels) Deprecated.Do not use this method, used internally by the SDK.showInfoWindow(TrimbleMapsMap trimbleMapsMap, MapView mapView) Deprecated.Do not use this method, used internally by the SDK.toString()Deprecated.Returns a String with the marker position.Methods inherited from class com.trimblemaps.mapsdk.annotations.Annotation
compareTo, equals, getId, getMapView, getTrimbleMapsMap, hashCode, remove, setId, setMapView, setTrimbleMapsMap
-
Constructor Details
-
Marker
Deprecated.Creates a instance ofMarkerusing the builder of Marker.- Parameters:
baseMarkerOptions- The builder used to construct the Marker.
-
-
Method Details
-
getPosition
public com.trimblemaps.mapsdk.geometry.LatLng getPosition()Deprecated.Returns the position of the marker.- Returns:
- A
LatLngobject specifying the marker's current position.
-
getSnippet
Deprecated.Gets the snippet of the marker.- Returns:
- A string containing the marker's snippet.
-
getTitle
Deprecated.Gets the snippet of the marker.- Returns:
- A string containing the marker's snippet.
-
hideInfoWindow
public void hideInfoWindow()Deprecated.Do not use this method, used internally by the SDK. -
isInfoWindowShown
public boolean isInfoWindowShown()Deprecated.Do not use this method, used internally by the SDK.- Returns:
- true if the infoWindow is shown
-
setPosition
public void setPosition(com.trimblemaps.mapsdk.geometry.LatLng position) Deprecated.Sets the location of the marker.- Parameters:
position- ALatLngdefining the marker position.
-
setSnippet
Deprecated.Sets the snippet of the marker.- Parameters:
snippet- A String used in the marker info window. Ifnull, the snippet is cleared.
-
setIcon
Deprecated.Sets the icon of the marker.- Parameters:
icon- TheIconto be used as Marker image
-
getIcon
Deprecated.Gets theIconcurrently used for the marker. If no Icon was set for the marker, the default icon will be returned.- Returns:
- The
Iconthe marker is using.
-
setTitle
Deprecated.Sets the title of the marker.- Parameters:
title- A String used in the marker info window. Ifnull, the title is cleared.
-
getInfoWindow
Deprecated.Gets theInfoWindowthe marker is using. If the marker hasn't had an info window defined, this will returnnull.- Returns:
- The info window the marker is using.
-
showInfoWindow
@Nullable public InfoWindow showInfoWindow(@NonNull TrimbleMapsMap trimbleMapsMap, @NonNull MapView mapView) Deprecated.Do not use this method, used internally by the SDK. UseTrimbleMapsMap.selectMarker(Marker)if you want to programmatically display the markers info window.- Parameters:
trimbleMapsMap- The hosting TrimbleMapsMap.mapView- The hosting map view.- Returns:
- The info window that was shown.
-
setTopOffsetPixels
public void setTopOffsetPixels(int topOffsetPixels) Deprecated.Do not use this method, used internally by the SDK.- Parameters:
topOffsetPixels- the top offset pixels.
-
setRightOffsetPixels
public void setRightOffsetPixels(int rightOffsetPixels) Deprecated.Do not use this method, used internally by the SDK.- Parameters:
rightOffsetPixels- the right offset pixels.
-
toString
Deprecated.Returns a String with the marker position.
-