PolygonDataSourceBuilder (API Reference)
Class PolygonDataSourceBuilder
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
ConstructorsConstructorDescriptionPolygonDataSourceBuilder(MapContext context) Creates a data source builder instance in the given context. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a PolygonDataSource instance.Configures the builder to use the given name for data source.withPolygon(PolygonData polygon) Configures the builder to insert the given polygon in the data source.withPolygons(List<PolygonData> polygon) Configures the builder to insert the given polygons in the data source.
-
Constructor Details
-
PolygonDataSourceBuilder
Creates a data source builder instance in the given context.
- Parameters:
context-Map context to associate the data source with.
-
-
Method Details
-
withName
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
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
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
Builds a PolygonDataSource instance.
- Returns:
Instance of the data source created with given polygons and attributes.
-