public class CustomGeometrySource extends Source
Constructor and Description |
---|
CustomGeometrySource(String id,
GeometryTileProvider provider)
Create a CustomGeometrySource
|
CustomGeometrySource(String id,
GeometryTileProvider provider,
CustomGeometrySourceOptions options)
Create a CustomGeometrySource with non-default CustomGeometrySourceOptions.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize() |
protected void |
initialize(String sourceId,
Object options) |
void |
invalidateRegion(LatLngBounds bounds)
Invalidate previously provided features within a given bounds at all zoom levels.
|
void |
invalidateTile(int zoomLevel,
int x,
int y)
Invalidate the geometry contents of a specific tile.
|
List<Feature> |
querySourceFeatures(Expression filter)
Queries the source for features.
|
void |
setTileData(int zoomLevel,
int x,
int y,
FeatureCollection data)
Set or update geometry contents of a specific tile.
|
checkThread, getAttribution, getId, getNativePtr, nativeGetAttribution, nativeGetId
public CustomGeometrySource(String id, GeometryTileProvider provider)
id
- The source id.provider
- The tile provider that returns geometry data for this source.public CustomGeometrySource(String id, GeometryTileProvider provider, CustomGeometrySourceOptions options)
Supported options are minZoom, maxZoom, buffer, and tolerance.
id
- The source id.provider
- The tile provider that returns geometry data for this source.options
- CustomGeometrySourceOptions.public void invalidateRegion(LatLngBounds bounds)
bounds
- The region in which features should be invalidated at all zoom levelspublic void invalidateTile(int zoomLevel, int x, int y)
zoomLevel
- Tile zoom level.x
- Tile X coordinate.y
- Tile Y coordinate.public void setTileData(int zoomLevel, int x, int y, FeatureCollection data)
zoomLevel
- Tile zoom level.x
- Tile X coordinate.y
- Tile Y coordinate.data
- Feature collection for the tile.public List<Feature> querySourceFeatures(Expression filter)
filter
- an optional filter expression to filter the returned Features© 2015–2018 Mapbox. All rights reserved.