DJI Mobile SDK Documentation

class DJIMarker

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

A marker that exists on a map object. To add a new marker to a map, see DJIMarkerOptions.

Class Members:
method setPosition
void setPosition(DJILatLng latLng)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the coordinates of the marker.

Input Parameters:
DJILatLng latLngThe new coordinates.
method setRotation
void setRotation(float rotation)
Package:com.dji.mapkit.core.models.annotations
Description:

Changes the rotation of the marker.

Input Parameters:
float rotationThe new rotation.
method
method setIcon
void setIcon(DJIBitmapDescriptor bitmap)
Package:com.dji.mapkit.core.models.annotations
Description:

Changes the icon of the marker.

Input Parameters:
DJIBitmapDescriptor bitmapThe new icon.
method
method setAnchor
void setAnchor(float u, float v)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the anchor point of the marker image.

Input Parameters:
float uHorizontal distance, normalized to [0, 1], of the anchor from the left edge.
float vVertical distance, normalized to [0, 1], of the anchor from the top edge.
method getPosition
DJILatLng getPosition()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the position of the marker.

Return:
DJILatLngThe position of the marker.
method
method setTitle
void setTitle(String title)
Package:com.dji.mapkit.core.models.annotations
Description:

Changes the title of the marker.

Input Parameters:
String titleThe new title.
method
method getTitle
String getTitle()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the title of the marker.

Return:
StringThe title of the marker.
method setVisible
void setVisible(boolean visible)
Package:com.dji.mapkit.core.models.annotations
Description:

Changes the visibility of the marker.

Input Parameters:
boolean visibletrue if the marker is visible, false if it is hidden.
method
method isVisible
boolean isVisible()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the visibility of the marker.

Return:
booleantrue if the marker is visible, false if it is hidden.
method
method remove
void remove()
Package:com.dji.mapkit.core.models.annotations
Description:

Removes the marker from the map it is on.

method
method setTag
void setTag(Object o)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the tag which is an object associated with the marker.

Input Parameters:
Object oAn object associated with the marker.
method
method getTag
Object getTag()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the tag.

Return:
ObjectAn object associated with the marker.
method setDraggable
void setDraggable(boolean draggable)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the draggability of the marker.

Input Parameters:
boolean draggableThe draggability of the marker.
method isDraggable
boolean isDraggable()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the draggability of the marker.

Return:
booleanThe draggability of the marker.