interface IMapWidgetManager |
| Package: | dji.open.pilot.client.interfaces |
Server-side map operation interface. Manages server-side map widgets, map elements, layers and AR annotations, supporting operations such as adding, removing, updating and querying. Supported since MSDK 5.20.1
void addMapWidget( MapWidget widget) |
| Package: | dji.open.pilot.client.interfaces |
Adds a map widget to the server. Supported since MSDK 5.20.1
| @NonNull MapWidget widget | Map widget. |
void removeMapWidget( MapWidget widget) |
| Package: | dji.open.pilot.client.interfaces |
Removes a map widget. Supported since MSDK 5.20.1
| @NonNull MapWidget widget | Map widget. |
void hideARAnnotations(boolean isHided, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Hides the server-side AR annotations. Supported since MSDK 5.20.1
| boolean isHided | Whether to hide. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void queryMapElement( CommonCallbacks.CompletionCallbackWithParam<List<MapElement>> callback) |
| Package: | dji.open.pilot.client.interfaces |
Queries the server-side map elements. Supported since MSDK 5.20.1
| @NonNull CommonCallbacks.CompletionCallbackWithParam<List<MapElement>> callback | Callback for the map element query result. |
void insertMapElement( MapElement element, CommonCallbacks.CompletionCallbackWithParam<UUID> callback) |
| Package: | dji.open.pilot.client.interfaces |
Inserts a server-side map element. Supported since MSDK 5.20.1
| @NonNull MapElement element | Map element, supports AR. |
| CommonCallbacks.CompletionCallbackWithParam<UUID> callback | Callback for the map element insertion result. |
void deleteMapElement( MapElement element, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Deletes a server-side map element. Supported since MSDK 5.20.1
| @NonNull MapElement element | Map element, supports AR. |
| CommonCallbacks.CompletionCallback callback | Callback for the map element deletion result. |
void updateMapElement( MapElement element, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Updates a server-side map element. Supported since MSDK 5.20.1
| @NonNull MapElement element | Map element, supports AR. |
| CommonCallbacks.CompletionCallback callback | Callback for the map element update result. |
void addMapStateListener( IMapStateListener listener) |
| Package: | dji.open.pilot.client.interfaces |
Adds a server-side map state listener. Supported since MSDK 5.20.1
| @NonNull IMapStateListener listener | Map state listener. |
void removeMapStateListener( IMapStateListener listener) |
| Package: | dji.open.pilot.client.interfaces |
Removes a server-side map state listener. Supported since MSDK 5.20.1
| @NonNull IMapStateListener listener | Map state listener. |
void addMapWidget( MapWidget widget, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Adds a map widget to the server (with result callback). Supported since MSDK 5.20.1
| @NonNull MapWidget widget | Map widget. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void removeMapWidget( MapWidget widget, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Removes a map widget (with result callback). Supported since MSDK 5.20.1
| @NonNull MapWidget widget | Map widget. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void updateMapWidgets( List<MapWidget> widgets, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Updates map widgets in batch.
Widgets are matched by id and their properties are updated in place (without visual flicker). If the id of any widget in the list does not exist, or an attempt is made to modify an immutable field (id / source / layerId), the whole batch update fails and no IPC is issued.
The following fields cannot be modified via this method, otherwise the WIDGET_FIELD_IMMUTABLE error is returned in the callback: id (unique widget identifier, immutable); source (source package name, immutable); layerId (the layer it belongs to; to move a widget to another layer, first call removeMapWidgetsByIds and then addMapWidgets again).
Note: Due to the Android Binder transmission limit, the total data volume of a single batch update should not exceed 512KB. When exceeded, the PAYLOAD_TOO_LARGE error is returned in the callback. Supported since MSDK 5.20.1
| @NonNull List<MapWidget> widgets | Map widget list. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void queryMapWidgets( CommonCallbacks.CompletionCallbackWithParam<List<MapWidget>> callback) |
| Package: | dji.open.pilot.client.interfaces |
Queries all map widgets added by the current plugin. Supported since MSDK 5.20.1
| @NonNull CommonCallbacks.CompletionCallbackWithParam<List<MapWidget>> callback | Query result callback. |
void queryMapWidgetsByLayer( String layerId, |
| Package: | dji.open.pilot.client.interfaces |
Queries all map widgets under the specified layer. Supported since MSDK 5.20.1
| @NonNull String layerId | Layer ID. |
| @NonNull CommonCallbacks.CompletionCallbackWithParam<List<MapWidget>> callback | Query result callback. |
void addMapWidgets( List<MapWidget> widgets, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Adds map widgets in batch.
Multiple widgets are added in a single IPC call, suitable for batch synchronization of GIS data.
Note: Due to the Android Binder transmission limit, the total data volume of a single batch addition should not exceed 512KB. It is recommended not to exceed 500 simple Marker widgets, or 200 polyline/polygon widgets that contain coordinate lists at a time. When exceeded, the PAYLOAD_TOO_LARGE error is returned in the callback. Supported since MSDK 5.20.1
| @NonNull List<MapWidget> widgets | Map widget list. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void removeMapWidgetsByIds( List<String> widgetIds, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Removes map widgets in batch by id list. Supported since MSDK 5.20.1
| @NonNull List<String> widgetIds | List of ids of the map widgets to be removed. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void addLayer( MapWidgetLayer layer, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Adds a layer.
A layer is a logical grouping container for map widgets. It can organize MapWidgets into different layers by business semantics (such as “fire point layer”, “personnel layer”), and supports showing/hiding and clearing an entire layer. A layer can contain MapWidgets of any DrawerType. Supported since MSDK 5.20.1
| @NonNull MapWidgetLayer layer | Layer. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void removeLayer( String layerId, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Removes a layer.
This also removes all map widgets under the layer. The default layer (empty layerId) cannot be removed, otherwise the LAYER_READONLY error is returned in the callback. If the layer does not exist, the LAYER_NOT_FOUND error is returned in the callback. Supported since MSDK 5.20.1
| @NonNull String layerId | Layer ID. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void setLayerVisible( String layerId, boolean visible, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Sets the layer visibility.
Controls the display/hiding of all map widgets under the entire layer. The visibility of the default layer (empty layerId) cannot be set, otherwise the LAYER_READONLY error is returned in the callback. If the layer does not exist, the LAYER_NOT_FOUND error is returned in the callback. Supported since MSDK 5.20.1
| @NonNull String layerId | Layer ID. |
| boolean visible | true to show, false to hide. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
void clearLayer( String layerId, CommonCallbacks.CompletionCallback callback) |
| Package: | dji.open.pilot.client.interfaces |
Clears a layer.
Removes all map widgets under the layer but keeps the layer itself. The default layer (empty layerId) cannot be cleared, otherwise the LAYER_READONLY error is returned in the callback. If the layer does not exist, the LAYER_NOT_FOUND error is returned in the callback. Supported since MSDK 5.20.1
| @NonNull String layerId | Layer ID. |
| CommonCallbacks.CompletionCallback callback | Result callback. |
class MapCircleOptions ↗
|
Circle configuration of a map widget element.
MSDK 5.20.1开始支持
|
| Package: | dji.open.pilot.base.manager.map |
Map widget drawer type. Supported since MSDK 5.20.1
| NONE | Not set. |
| MARKER | Map marker. |
| POLYLINE | Map polyline. |
| POLYGON | Map polygon. |
| CIRCLE | Map circle. |
| PIN | Map pin point. |
class MapElement ↗
|
Map element.
MSDK 5.20.1开始支持
enum MapElementColor |
| Package: | dji.open.pilot.base.manager.map |
Color of a map element. Supported since MSDK 5.20.1
| BLUE | Semi-transparent blue. |
| GREEN | Semi-transparent green. |
| YELLOW | Semi-transparent yellow. |
| ORANGE | Semi-transparent orange. |
| RED | Semi-transparent red. |
| NAME_DEFAULT | Default color. |
class MapMarkerOptions ↗
|
Marker configuration of a map widget element.
MSDK 5.20.1开始支持
class MapPolygonOptions ↗
|
Polygon configuration of a map widget element.
MSDK 5.20.1开始支持
class MapPolylineOptions ↗
|
Polyline configuration of a map widget element.
MSDK 5.20.1开始支持
class MapWidget ↗
|
Map widget.
MSDK 5.20.1开始支持
class MapWidgetItem ↗
|
Map widget item, used to describe the custom configuration of a map widget.
MSDK 5.20.1开始支持
|
| Package: | dji.open.pilot.base.manager.map |
Map widget item type. Supported since MSDK 5.20.1
| DIALOG | Dialog. |
| NONE | Not set. |
class MapWidgetLayer ↗
|
Map widget layer.
MSDK 5.20.1开始支持