Class PolygonDataBuilder
Class PolygonDataBuilder
- java.lang.Object
-
- com.here.NativeBase
-
- com.here.sdk.mapview.datasource.PolygonDataBuilder
-
public final class PolygonDataBuilder extends NativeBase
Builder of
PolygonDatainstances.The builder can create
PolygonDatainstances for polygons with an outer boundary and optionally one or more inner boundaries (holes).Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
-
-
Constructor Summary
Constructors Constructor Description PolygonDataBuilder()Creates a builder instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolygonDatabuild()Builds an instance ofPolygonDataand resets the builder instance.PolygonDataBuilderwithAttributes(DataAttributes attributes)Configures the builder with custom attributes for polygon to be created.PolygonDataBuilderwithGeometry(GeoPolygon geometry)Configures the builder with geometry for the polygon to be created.
-
-
-
Method Detail
-
withGeometry
@NonNull public PolygonDataBuilder withGeometry(@NonNull GeoPolygon geometry)
Configures the builder with geometry for the polygon to be created.
- Parameters:
geometry-Geometry of the polygon. The outer boundary has to be ordered clockwise and closed. Any inner boundary has to be ordered counterclockwise and closed. Altitude of boundary vertices is ignored. The visual behaviour for self-intersecting outer boundary is undefined.
- Returns:
The builder.
-
withAttributes
@NonNull public PolygonDataBuilder withAttributes(@NonNull DataAttributes attributes)
Configures the builder with custom attributes for polygon to be created.
- Parameters:
attributes-Custom data attributes to be associated with the polygon.
- Returns:
The builder.
-
build
@NonNull public PolygonData build()
Builds an instance of
PolygonDataand resets the builder instance.- Returns:
Instance of
PolygonDatacreated with the configured parameters.
-
-