DJI Mobile SDK Documentation

class DJIPolygon

interface DJIPolygon
Package:com.dji.mapkit.core.models.annotations
Description:

A polygon that exists on a map object. To add a new polygon to a map, see DJIPolygonOptions.

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

Removes the polygon from the map it is on.

method setVisible
void setVisible(boolean visible)
Package:com.dji.mapkit.core.models.annotations
Description:

Changes the visibility of the polygon.

Input Parameters:
boolean visibletrue if the polygon is visible, false if it is hidden.
method
method isVisible
boolean isVisible()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the visibility of the polygon.

Return:
booleantrue if the polygon is visible, false if it is hidden.
method
method setPoints
void setPoints(List<DJILatLng> points)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the points of the polygon.

Input Parameters:
List<DJILatLng> pointsThe points of the polygon.
method
method getPoints
List<DJILatLng> getPoints()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the points of the polygon.

Return:
List<DJILatLng>The points of the polygon.
method setFillColor
void setFillColor(@ColorInt int color)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the fill color of the polygon.

Input Parameters:
@ColorInt int colorThe fill color of the polygon.
method getFillColor
@ColorInt
int getFillColor()
Package:com.dji.mapkit.core.models.annotations
Description:

The fill color of the polygon.

Return:
intThe fill color of the polygon.
method setStrokeColor
void setStrokeColor(@ColorInt int color)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the stroke color of the polygon.

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

Gets the stroke color of the polygon.

Return:
intThe stroke color of the polygon.
method setStrokeWidth
void setStrokeWidth(float strokeWidth)
Package:com.dji.mapkit.core.models.annotations
Description:

Sets the stroke width of the polygon.

Input Parameters:
float strokeWidthThe stroke width of the polygon.
method getStrokeWidth
float getStrokeWidth()
Package:com.dji.mapkit.core.models.annotations
Description:

Gets the stroke width of the polygon.

Return:
floatThe stroke width of the polygon.