DJI Mobile SDK Documentation

interface DJIMap

interface DJIMap
Package:com.dji.mapkit.core.maps
Description:

The public interface of map object.

Class Members:
Add Marker
method
method addMarker
DJIMarker addMarker(DJIMarkerOptions markerOptions)
Package:com.dji.mapkit.core.maps
Description:

Adds a marker to this map.

Input Parameters:
DJIMarkerOptions markerOptionsDescribes how to create the marker.
Return:
DJIMarkerThe marker that was added to the map.
Get Map
method
method getMap
Object getMap()
Package:com.dji.mapkit.core.maps
Description:

Gets the base Map Object. This will enable all the features available by default in each Map Provider

Return:
ObjectThe DJIMap object.
Set Listener
method
method setOnCameraChangeListener
void setOnCameraChangeListener(final OnCameraChangeListener listener)
Package:com.dji.mapkit.core.maps
Description:

Sets the OnCameraChangeListener which can listen to camera changes.

Input Parameters:
final OnCameraChangeListener listenerThe listener that is added to this map.
method setOnMarkerClickListener
void setOnMarkerClickListener(OnMarkerClickListener listener)
Package:com.dji.mapkit.core.maps
Description:

Sets the which can listen click events on the map's markers.

Input Parameters:
OnMarkerClickListener listenerThe listener that is added to this map.
method setOnMapClickListener
void setOnMapClickListener(OnMapClickListener listener)
Package:com.dji.mapkit.core.maps
Description:

Sets the .

Input Parameters:
OnMapClickListener listenerThe listener that is added to this map.
method setOnMarkerDragListener
void setOnMarkerDragListener(OnMarkerDragListener listener)
Package:com.dji.mapkit.core.maps
Description:

Sets the map's .

Input Parameters:
OnMarkerDragListener listenerThe listener that is added to this map.
method removeAllOnCameraChangeListeners
void removeAllOnCameraChangeListeners()
Package:com.dji.mapkit.core.maps
Description:

Removes all instances of OnCameraChangeListener from the map.

method removeOnMarkerClickListener
void removeOnMarkerClickListener(OnMarkerClickListener listener)
Package:com.dji.mapkit.core.maps
Description:

Removes the from the map.

Input Parameters:
OnMarkerClickListener listenerThe listener to remove.
method setCameraPosition
void setCameraPosition(DJICameraPosition cameraPosition)
Package:com.dji.mapkit.core.maps
Description:

Sets the camera position.

Input Parameters:
DJICameraPosition cameraPositionThe camera position.
method getCameraPosition
DJICameraPosition getCameraPosition()
Package:com.dji.mapkit.core.maps
Description:

Gets the camera position.

Return:
DJICameraPositionThe DJICameraPosition object.
method setMapType
void setMapType(MapType type)
Package:com.dji.mapkit.core.maps
Description:

Sets the map type of this map.

Input Parameters:
MapType typeThe map type that the map will be set to.
method removeOnMapClickListener
void removeOnMapClickListener(OnMapClickListener listener)
Package:com.dji.mapkit.core.maps
Description:

Removes the from the map.

Input Parameters:
OnMapClickListener listenerThe listener to remove.
method removeOnMarkerDragListener
void removeOnMarkerDragListener(OnMarkerDragListener listener)
Package:com.dji.mapkit.core.maps
Description:

Removes the from the map.

Input Parameters:
OnMarkerDragListener listenerThe listener to remove.
Remove Listeners
method
method removeAllOnMarkerDragListener
void removeAllOnMarkerDragListener()
Package:com.dji.mapkit.core.maps
Description:

Removes all 's from the map.

Map Type
enum
enum MapType
enum MapType
Package:com.dji.mapkit.core.maps
Description:

The overall representation of the map.

Enum Members:
NormalThe overall representation of the map.
SatelliteSatellite photograph data.
HybridSatellite photograph data and roads
Class Members:
State Updates
unknown
unknown
interface OnMarkerClickListener
Package:com.dji.mapkit.core.maps
Description:

Listener on the marker click event.

unknown
unknown
interface OnMapClickListener
Package:com.dji.mapkit.core.maps
Description:

Listener on the map click event.

unknown
unknown
interface OnMarkerDragListener
Package:com.dji.mapkit.core.maps
Description:

Listener on the marker drag event.

interface OnCameraChangeListener
interface OnCameraChangeListener
Package:com.dji.mapkit.core.callback
Description:

Listener on the camera change event.

Interface Methods:

Callback Method

Camera Position Changed
method
method onCameraChange
void onCameraChange(DJICameraPosition cameraPosition)
Package:com.dji.mapkit.core.callback
Description:

A callback indicating that the camera position has changed.

Input Parameters:
DJICameraPosition cameraPositionThe new camera position.
property com.dji.mapkit.core.utils.DJIGpsUtils
import com.dji.mapkit.core.utils.DJIGpsUtils
Package:com.dji.mapkit.core.models
Description:

Represents a point which includes latitude, longitude, altitude, and accuracy info on a map.