DJI Mobile SDK Documentation

class DJIPolygonOptions

class DJIPolygonOptions extends BasePointCollection
Package:com.dji.mapkit.core.models.annotations
Inherits From:BasePointCollection
Description:

Represents a set of instructions for creating a new DJIPolygon. This object can be passed to DJIPolygonOptions to add a new polygon to a map. Each method returns the object itself so that they can be used in a builder pattern.

Class Members:
method DJIPolygonOptions
DJIPolygonOptions()
Package:com.dji.mapkit.core.models.annotations
Description:

Creates a new DJIPolygonOptions object.

method strokeWidth
DJIPolygonOptions strokeWidth(float width)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the stroke width the new polygon will have when added to the map.

Input Parameters:
float widthThe stroke width of the polygon in pixels.
Return:
DJIPolygonOptionsThe DJIPolygonOptions object.
method
method zIndex
DJIPolygonOptions zIndex(float zIndex)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the zIndex the new polygon will have when added to the map.

Input Parameters:
float zIndexThe zIndex of the polygon.
Return:
DJIPolygonOptionsThe DJIPolygonOptions object.
method strokeColor
DJIPolygonOptions strokeColor(@ColorInt int color)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the stroke color the new polygon will have when added to the map.

Input Parameters:
@ColorInt int colorThe stroke color of the polygon.
Return:
DJIPolygonOptionsThe DJIPolygonOptions object.
method
method fillColor
DJIPolygonOptions fillColor(@ColorInt int color)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the fill color the new polygon will have when added to the map.

Input Parameters:
@ColorInt int colorThe fill color of the polygon.
Return:
DJIPolygonOptionsThe DJIPolygonOptions object.
method
method add
DJIPolygonOptions add(DJILatLng point)
Package:com.dji.mapkit.core.models.annotations
Description:

Adds the given point to the polygon.

Input Parameters:
DJILatLng pointThe coordinates of the point to add.
Return:
DJIPolygonOptionsThe DJIPolygonOptions object.
method
method add
DJIPolygonOptions add(DJILatLng... points)
Package:com.dji.mapkit.core.models.annotations
Description:

Adds the given points to the polygon.

Input Parameters:
DJILatLng... pointsThe coordinates of the points to add.
Return:
DJIPolygonOptionsThe DJIPolygonOptions object.
method
method addAll
DJIPolygonOptions addAll(List<DJILatLng> points)
Package:com.dji.mapkit.core.models.annotations
Description:

Adds the given points to the polygon.

Input Parameters:
List<DJILatLng> pointsThe coordinates of the points to add.
Return:
DJIPolygonOptionsThe DJIPolygonOptions object.