public class CustomGeometrySource extends Source
CustomGeometrySource uses a coalescing model for frequent data updates targeting the same tile id, which means, that the in-progress request as well as the last scheduled request are guaranteed to finish. Any requests scheduled meanwhile can be canceled.
| Modifier and Type | Field and Description |
|---|---|
static int |
THREAD_POOL_LIMIT |
static java.lang.String |
THREAD_PREFIX |
| Constructor and Description |
|---|
CustomGeometrySource(java.lang.String id,
CustomGeometrySourceOptions options,
GeometryTileProvider provider)
Create a CustomGeometrySource with non-default
CustomGeometrySourceOptions. |
CustomGeometrySource(java.lang.String id,
GeometryTileProvider provider)
Create a CustomGeometrySource
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
protected void |
initialize(java.lang.String sourceId,
java.lang.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.
|
java.util.List<com.mapbox.geojson.Feature> |
querySourceFeatures(Expression filter)
Queries the source for features.
|
void |
setTileData(int zoomLevel,
int x,
int y,
com.mapbox.geojson.FeatureCollection data)
Set or update geometry contents of a specific tile.
|
checkThread, getAttribution, getId, getMaxOverscaleFactorForParentTiles, getMinimumTileUpdateInterval, getNativePtr, getPrefetchZoomDelta, isVolatile, nativeGetAttribution, nativeGetId, nativeGetMaxOverscaleFactorForParentTiles, nativeGetMinimumTileUpdateInterval, nativeGetPrefetchZoomDelta, nativeIsVolatile, nativeSetMaxOverscaleFactorForParentTiles, nativeSetMinimumTileUpdateInterval, nativeSetPrefetchZoomDelta, nativeSetVolatile, setDetached, setMaxOverscaleFactorForParentTiles, setMinimumTileUpdateInterval, setPrefetchZoomDelta, setVolatilepublic static final java.lang.String THREAD_PREFIX
public static final int THREAD_POOL_LIMIT
@UiThread
public CustomGeometrySource(java.lang.String id,
GeometryTileProvider provider)
id - The source id.provider - The tile provider that returns geometry data for this source.@UiThread
public CustomGeometrySource(java.lang.String id,
CustomGeometrySourceOptions options,
GeometryTileProvider provider)
CustomGeometrySourceOptions.id - The source id.options - CustomGeometrySourceOptions.provider - The tile provider that returns geometry data for this source.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,
com.mapbox.geojson.FeatureCollection data)
zoomLevel - Tile zoom level.x - Tile X coordinate.y - Tile Y coordinate.data - Feature collection for the tile.@NonNull
public java.util.List<com.mapbox.geojson.Feature> querySourceFeatures(@Nullable
Expression filter)
filter - an optional filter expression to filter the returned Featuresprotected void initialize(java.lang.String sourceId,
java.lang.Object options)
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable