DJI Mobile SDK Documentation

      class MapWidget

      @Keep
      class MapWidget implements Parcelable
      Package:dji.open.pilot.base.manager.map
      Description:

      Map widget.

      Supported since MSDK 5.20.1

      Class Members:
      method
      method getId
      String getId() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the map widget ID, which is a unique identifier.

      Supported since MSDK 5.20.1

      Return:
      StringMap widget ID.
      method getDrawerType
      MapDrawerType getDrawerType() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the map widget type.

      Supported since MSDK 5.20.1

      Return:
      MapDrawerTypeMap widget type.
      method setDrawerType
      void setDrawerType(MapDrawerType drawerType) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the map widget type.

      Supported since MSDK 5.20.1

      Input Parameters:
      MapDrawerType drawerTypeMap widget type.
      method getAssociatedItem
      MapWidgetItem getAssociatedItem() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the associated map widget item.

      Supported since MSDK 5.20.1

      Return:
      MapWidgetItemMap widget item.
      method setAssociatedItem
      void setAssociatedItem(MapWidgetItem associatedItem) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the associated map widget item.

      Supported since MSDK 5.20.1

      Input Parameters:
      MapWidgetItem associatedItemMap widget item.
      method getCircleOptions
      MapCircleOptions getCircleOptions() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the circle configuration of the map widget.

      Supported since MSDK 5.20.1

      Return:
      MapCircleOptionsCircle configuration of the map widget.
      method setCircleOptions
      void setCircleOptions(MapCircleOptions circleOptions) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the circle configuration of the map widget.

      Supported since MSDK 5.20.1

      Input Parameters:
      MapCircleOptions circleOptionsCircle configuration of the map widget.
      method getMarkerOptions
      MapMarkerOptions getMarkerOptions() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the marker configuration of the map widget.

      Supported since MSDK 5.20.1

      Return:
      MapMarkerOptionsMarker configuration of the map widget.
      method setMarkerOptions
      void setMarkerOptions(MapMarkerOptions markerOptions) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the marker configuration of the map widget.

      Supported since MSDK 5.20.1

      Input Parameters:
      MapMarkerOptions markerOptionsMarker configuration of the map widget.
      method getPolygonOptions
      MapPolygonOptions getPolygonOptions() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the polygon configuration of the map widget.

      Supported since MSDK 5.20.1

      Return:
      MapPolygonOptionsPolygon configuration of the map widget.
      method setPolygonOptions
      void setPolygonOptions(MapPolygonOptions polygonOptions) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the polygon configuration of the map widget.

      Supported since MSDK 5.20.1

      Input Parameters:
      MapPolygonOptions polygonOptionsPolygon configuration of the map widget.
      method getPolylineOptions
      MapPolylineOptions getPolylineOptions() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the polyline configuration of the map widget.

      Supported since MSDK 5.20.1

      Return:
      MapPolylineOptionsPolyline configuration of the map widget.
      method setPolylineOptions
      void setPolylineOptions(MapPolylineOptions polylineOptions) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the polyline configuration of the map widget.

      Supported since MSDK 5.20.1

      Input Parameters:
      MapPolylineOptions polylineOptionsPolyline configuration of the map widget.
      method getLayerId
      String getLayerId() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the ID of the layer it belongs to.

      An empty string by default indicates it is grouped into the default layer.

      Supported since MSDK 5.20.1

      Return:
      StringLayer ID.
      method setLayerId
      void setLayerId(String layerId) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the ID of the layer it belongs to.

      Used to group the widget into a specified MapWidgetLayer. If not set, it is grouped into the default layer.

      Supported since MSDK 5.20.1

      Input Parameters:
      String layerIdLayer ID, obtained from MapWidgetLayer.getId().
      method
      method getName
      String getName() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the map widget name.

      Used for business identification, making it easier to recognize the widget during logging/debugging/querying. It is not displayed on the map (different from MapMarkerOptions.getTitle() / MapWidgetItem.getTitle()).

      Supported since MSDK 5.20.1

      Return:
      StringMap widget name.
      method
      method setName
      void setName(String name) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the map widget name.

      Used for business identification (such as “Fire point-A12”, “Personnel-Zhang San”), and is not displayed on the map. To display text on the map, use MapMarkerOptions.setTitle(String) (marker title) or MapWidgetItem.setTitle(String) (popup title on click).

      Supported since MSDK 5.20.1

      Input Parameters:
      String nameMap widget name.