DJI Mobile SDK Documentation

      class MapWidgetLayer

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

      Map widget layer.

      A layer is a logical grouping container for map widgets, used to organize MapWidgets by business semantics (such as “fire point layer”, “personnel layer”). It supports showing/hiding and clearing an entire layer. A layer can contain MapWidgets of any DrawerType.

      Supported since MSDK 5.20.1

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

      Constructs a layer, automatically generating an id and filling in the source package name.

      Supported since MSDK 5.20.1

      Input Parameters:
      String nameLayer name, such as "fire point layer", "personnel layer".
      method
      method getId
      String getId() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the layer ID, which is a unique identifier.

      Supported since MSDK 5.20.1

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

      Gets the source of the layer (the package name of the creator).

      Supported since MSDK 5.20.1

      Return:
      StringSource package name of the layer.
      method
      method getName
      String getName() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the layer name.

      Supported since MSDK 5.20.1

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

      Sets the layer name.

      Supported since MSDK 5.20.1

      Input Parameters:
      String nameLayer name.
      method
      method isVisible
      boolean isVisible() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the layer visibility.

      Supported since MSDK 5.20.1

      Return:
      booleantrue visible, false hidden.
      method setVisible
      void setVisible(boolean visible) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the layer visibility.

      Supported since MSDK 5.20.1

      Input Parameters:
      boolean visibletrue visible, false hidden.
      method
      method getZIndex
      int getZIndex() 
      Package:dji.open.pilot.base.manager.map
      Description:

      Gets the layer stacking priority.

      Supported since MSDK 5.20.1

      Return:
      intStacking priority, ranging from 0 to 100.
      method
      method setZIndex
      void setZIndex(int zIndex) 
      Package:dji.open.pilot.base.manager.map
      Description:

      Sets the layer stacking priority.

      The value ranges from 0 to 100. The larger the value, the higher the priority and the more on top the layer is. Among layers with the same priority, the later added one covers the earlier added one. An IllegalArgumentException is thrown when the value is out of range.

      Supported since MSDK 5.20.1

      Input Parameters:
      int zIndexStacking priority, ranging from 0 to 100.