DJI Mobile SDK Documentation

class DJIMarkerOptions

class DJIMarkerOptions
Package:com.dji.mapkit.core.models.annotations
Description:

Represents a set of instructions for creating a new DJIMarker. This object can be passed to DJIMarkerOptions to add a new marker to a map. Each method returns the object itself so that they can be used in a builder pattern.

Class Members:
method DJIMarkerOptions
DJIMarkerOptions()
Package:com.dji.mapkit.core.models.annotations
Description:

Creates a new DJIMarkerOptions object.

method
method draggable
DJIMarkerOptions draggable(boolean draggable)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the draggability the new marker will have when added to the map.

Input Parameters:
boolean draggableThe draggability of the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method position
DJIMarkerOptions position(DJILatLng position)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the position the new marker will have when added to the map.

Input Parameters:
DJILatLng positionThe coordinates of the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method anchor
DJIMarkerOptions anchor(@FloatRange(from = 0, to = 1) float u,
@FloatRange(from = 0, to = 1) float v)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the anchor point the marker image will have when added to the map. The default is (0.5, 0.5).

Input Parameters:
@FloatRange(from = 0, to = 1) float uHorizontal distance, normalized to [0, 1], of the anchor from the left edge.
@FloatRange(from = 0, to = 1) float vVertical distance, normalized to [0, 1], of the anchor from the top edge.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method icon
DJIMarkerOptions icon(DJIBitmapDescriptor bitmap)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the icon the new marker will have when added to the map.

Input Parameters:
DJIBitmapDescriptor bitmapThe icon of the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method rotation
DJIMarkerOptions rotation(float rotation)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the rotation the new marker will have when added to the map.

Input Parameters:
float rotationThe rotation of the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method zIndex
DJIMarkerOptions zIndex(int zIndex)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the zIndex the new marker will have when added to the map.

Input Parameters:
int zIndexThe zIndex of the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method visible
DJIMarkerOptions visible(boolean visible)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the visibility the new marker will have when added to the map.

Input Parameters:
boolean visibleThe visibility of the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method title
DJIMarkerOptions title(String title)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the title the new marker will have when added to the map.

Input Parameters:
String titleThe title of the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method
method flat
DJIMarkerOptions flat(boolean flat)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets whether the marker should be flat against the map when added to the map. Only supported by AMaps and Google Maps.

Input Parameters:
boolean flattrue if the marker should be flat against the map, false if the marker should be a billboard facing the camera.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.
method setInfoWindowEnable
DJIMarkerOptions setInfoWindowEnable(boolean infoWindowEnable)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets whether the info window is enabled for the new marker when added to the map. Only supported by AMaps.

Input Parameters:
boolean infoWindowEnableWhether the info window is enabled for the marker.
Return:
DJIMarkerOptionsThe DJIMarkerOptions object.