Class MarkerView

java.lang.Object
com.trimblemaps.mapsdk.plugins.markerview.MarkerView

public class MarkerView extends Object
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.

  • Constructor Details

    • MarkerView

      public MarkerView(@NonNull com.trimblemaps.mapsdk.geometry.LatLng latLng, @NonNull android.view.View view)
      Create a MarkerView
      Parameters:
      latLng - latitude-longitude pair
      view - 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