Class PolygonDataSourceBuilder
Class PolygonDataSourceBuilder
- java.lang.Object
-
- com.here.NativeBase
-
- com.here.sdk.mapview.datasource.PolygonDataSourceBuilder
-
public final class PolygonDataSourceBuilder extends NativeBase
Builder of the polygons data source.
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 PolygonDataSourceBuilder(MapContext context)Creates a data source builder instance in the given context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PolygonDataSourcebuild()Builds a PolygonDataSource instance.PolygonDataSourceBuilderwithName(java.lang.String dataSourceName)Configures the builder to use the given name for data source.PolygonDataSourceBuilderwithPolygon(PolygonData polygon)Configures the builder to insert the given polygon in the data source.PolygonDataSourceBuilderwithPolygons(java.util.List<PolygonData> polygon)Configures the builder to insert the given polygons in the data source.
-
-
-
Constructor Detail
-
PolygonDataSourceBuilder
public PolygonDataSourceBuilder(@NonNull MapContext context)Creates a data source builder instance in the given context.
- Parameters:
context-Map context to associate the data source with.
-
-
Method Detail
-
withName
@NonNull public PolygonDataSourceBuilder withName(@NonNull java.lang.String dataSourceName)
Configures the builder to use the given name for data source.
- Parameters:
dataSourceName-Name of the created data source. Must be unique.
- Returns:
This data source builder instance.
-
withPolygon
@NonNull public PolygonDataSourceBuilder withPolygon(@NonNull PolygonData polygon)
Configures the builder to insert the given polygon in the data source.
- Parameters:
polygon-The polygon to add.
- Returns:
This data source builder instance.
-
withPolygons
@NonNull public PolygonDataSourceBuilder withPolygons(@NonNull java.util.List<PolygonData> polygon)
Configures the builder to insert the given polygons in the data source.
- Parameters:
polygon-The polygons to add.
- Returns:
This data source builder instance.
-
build
@NonNull public PolygonDataSource build()
Builds a PolygonDataSource instance.
- Returns:
Instance of the data source created with given polygons and attributes.
-
-