Class MarkerView
java.lang.Object
com.trimblemaps.mapsdk.plugins.markerview.MarkerView
MarkerView class wraps a latitude-longitude pair with a Android SDK View.
It can be used in conjunction with MarkerViewManager to synchronise the Android SDK View on top of map at the latitude-longitude pair.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback definition that is invoked when position placement of a MarkerView is calculated. -
Constructor Summary
ConstructorsConstructorDescriptionMarkerView(com.trimblemaps.mapsdk.geometry.LatLng latLng, android.view.View view) Create a MarkerView -
Method Summary
Modifier and TypeMethodDescriptionvoidsetLatLng(com.trimblemaps.mapsdk.geometry.LatLng latLng) Update the location of the MarkerView on the map.voidsetOnPositionUpdateListener(MarkerView.OnPositionUpdateListener onPositionUpdateListener) Set a callback to be invoked when position placement is calculated.
-
Constructor Details
-
MarkerView
public MarkerView(@NonNull com.trimblemaps.mapsdk.geometry.LatLng latLng, @NonNull android.view.View view) Create a MarkerView- Parameters:
latLng- latitude-longitude pairview- an Android SDK View
-
-
Method Details
-
setLatLng
public void setLatLng(@NonNull com.trimblemaps.mapsdk.geometry.LatLng latLng) Update the location of the MarkerView on the map.Provided as a latitude-longitude pair.
- Parameters:
latLng- latitude-longitude pair
-
setOnPositionUpdateListener
public void setOnPositionUpdateListener(MarkerView.OnPositionUpdateListener onPositionUpdateListener) Set a callback to be invoked when position placement is calculated.Can be used to offset a MarkerView on screen.
- Parameters:
onPositionUpdateListener- callback to be invoked when position placement is calculated
-