Class FeatureTiles
java.lang.Object
mil.nga.geopackage.tiles.features.FeatureTiles
- Direct Known Subclasses:
DefaultFeatureTiles
Tiles drawn from or linked to features. Used to query features and optionally draw tiles
from those features.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected android.graphics.Bitmap.CompressFormatCompress formatprotected final android.content.ContextContextprotected floatTile density based upon the device-independent pixelsTileUtils.TILE_DPprotected final FeatureDaoTile data access objectprotected FeatureTableStylesFeature Style extensionprotected booleanFill polygon flagprotected booleanDraw geometries using geodesic linesprotected floatHeight overlapping pixels between tile imagesprotected FeatureIndexManagerWhen not null, features are retrieved using a feature indexprotected android.graphics.PaintLine paintprotected floatLine stroke widthprotected IntegerOptional max features per tile.protected CustomFeaturesTileWhen not null and the number of features is greater than the max features per tile, used to draw tiles for those tiles with more features than the maxprotected FeatureTilePointIconOptional point icon in place of a drawn circleprotected android.graphics.PaintPoint paintprotected floatPoint radiusprotected android.graphics.PaintPolygon fill paintprotected android.graphics.PaintPolygon paintprotected floatPolygon stroke widthprotected ProjectionFeature DAO Projectionprotected booleanWhen true, geometries are simplified before being drawn.protected intTile heightprotected intTile widthprotected static final ProjectionWeb Mercator Projectionprotected static final ProjectionWGS84 Projectionprotected floatWidth overlapping pixels between tile images -
Constructor Summary
ConstructorsConstructorDescriptionFeatureTiles(android.content.Context context, FeatureDao featureDao) ConstructorFeatureTiles(android.content.Context context, FeatureDao featureDao, boolean geodesic) ConstructorFeatureTiles(android.content.Context context, FeatureDao featureDao, float density) ConstructorFeatureTiles(android.content.Context context, FeatureDao featureDao, float density, boolean geodesic) ConstructorFeatureTiles(android.content.Context context, FeatureDao featureDao, int width, int height) ConstructorFeatureTiles(android.content.Context context, FeatureDao featureDao, int width, int height, boolean geodesic) ConstructorFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, int width, int height, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables -
Method Summary
Modifier and TypeMethodDescriptionvoidCall after making changes to the point icon, point radius, or paint stroke widths.Calculate style pixel boundscalculateStylePixelBounds(float density) Calculate style pixel boundsprotected android.graphics.BitmapcheckIfDrawn(android.graphics.Bitmap bitmap) Check if the bitmap was drawn upon (non null and not transparent).voidClear all cachesvoidClear the icon cachevoidClear the style paint cachevoidclose()Close the feature tiles connectionprotected android.graphics.BitmapCreate a new empty Bitmapandroid.graphics.BitmapdrawTile(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom levelabstract android.graphics.BitmapdrawTile(int zoom, BoundingBox webMercatorBoundingBox, List<FeatureRow> featureRow) Draw a tile bitmap from the feature rowsabstract android.graphics.BitmapdrawTile(int zoom, BoundingBox webMercatorBoundingBox, FeatureIndexResults results) Draw a tile bitmap from feature index resultsabstract android.graphics.BitmapdrawTile(int zoom, BoundingBox webMercatorBoundingBox, FeatureCursor cursor) Draw a tile bitmap from feature geometries in the provided cursorbyte[]drawTileBytes(int x, int y, int zoom) Draw the tile and get the bytes from the x, y, and zoom levelandroid.graphics.BitmapdrawTileQueryAll(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom level by querying all features.android.graphics.BitmapdrawTileQueryIndex(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom level by querying features in the tile locationexpandBoundingBox(BoundingBox webMercatorBoundingBox) Create an expanded bounding box to handle features outside the tile that overlapexpandBoundingBox(BoundingBox webMercatorBoundingBox, BoundingBox tileWebMercatorBoundingBox) Create an expanded bounding box to handle features outside the tile that overlapexpandBoundingBox(BoundingBox boundingBox, Projection projection) Create an expanded bounding box to handle features outside the tile that overlapgeodesicPath(double maxDistance, List<Point> points) When geodesic is enabled, create a geodesic path of pointsandroid.graphics.Bitmap.CompressFormatGet the compress formatfloatGet the densityGet the feature DAOprotected FeatureStylegetFeatureStyle(FeatureRow featureRow) Get the feature style for the feature row and geometry typeprotected FeatureStylegetFeatureStyle(FeatureRow featureRow, GeometryType geometryType) Get the feature style for the feature row and geometry typeGet the feature table stylesfloatGet the height draw overlapprotected android.graphics.BitmapGet the icon bitmap from the icon rowGet the index managerintGet line alphaintGet line colorprotected android.graphics.PaintgetLinePaint(FeatureStyle featureStyle) Get the line paint for the feature style, or return the default paintandroid.graphics.PaintGet a copy of the line paint, must callsetLinePaint(Paint)to update the paintfloatGet line stroke widthGet the max features per tileGet the max features tile draw, the custom tile drawing implementation for tiles with more features than the max at #getMaxFeaturesPerTileGet the point iconandroid.graphics.PaintGet point paintprotected android.graphics.PaintgetPointPaint(FeatureStyle featureStyle) Get the point paint for the feature style, or return the default paintfloatGet the point radiusintGet polygon alphaintGet polygon colorintGet polygon fill alphaintGet polygon fill colorprotected android.graphics.PaintgetPolygonFillPaint(FeatureStyle featureStyle) Get the polygon fill paint for the feature style, or return the default paintandroid.graphics.PaintGet the polygon fill paintprotected android.graphics.PaintgetPolygonPaint(FeatureStyle featureStyle) Get the polygon paint for the feature style, or return the default paintandroid.graphics.PaintGet a copy of the polygon paint, must callsetPolygonPaint(Paint)to update the paintfloatGet polygon stroke widthprotected GeometryTransformgetProjectionToWebMercatorTransform(Projection projection) Create a projection transformation from provided projection to Web MercatorintGet the tile heightintGet the tile widthprotected ProjectionTransformCreate a projection transformation from WGS84 to Web MercatorfloatGet the width draw overlapvoidIgnore the feature table styles within the GeoPackagebooleanIs fill polygonbooleanAre geometries drawn using geodesic lines? Default is falsebooleanIs index querybooleanIs the simplify geometries flag set? Default is trueprotected booleanisTransparent(android.graphics.Bitmap bitmap) Determine if the bitmap is a transparent image (must be in expected tile dimensions)queryIndexedFeatures(int x, int y, int zoom) Query for feature results in the x, y, and zoom level by querying features in the tile locationqueryIndexedFeatures(BoundingBox webMercatorBoundingBox) Query for feature results in the bounding boxlongqueryIndexedFeaturesCount(int x, int y, int zoom) Query for feature result count in the x, y, and zoomlongqueryIndexedFeaturesCount(BoundingBox webMercatorBoundingBox) Query for feature result count in the bounding boxvoidsetCompressFormat(android.graphics.Bitmap.CompressFormat compressFormat) Set the compress formatvoidsetDensity(float density) Set the densityvoidsetDrawOverlap(float pixels) Manually set the width and height draw overlapvoidsetFeatureTableStyles(FeatureTableStyles featureTableStyles) Set the feature table stylesvoidsetFillPolygon(boolean fillPolygon) Set the fill polygonvoidsetGeodesic(boolean geodesic) Set the geodestic flag, true to draw geodesic geometriesvoidsetHeightDrawOverlap(float pixels) Manually set the height draw overlapvoidsetIconCacheSize(int size) Set / resize the icon cache sizevoidsetIndexManager(FeatureIndexManager indexManager) Set the indexvoidsetLineAlpha(int lineAlpha) Set line alphavoidsetLineColor(int lineColor) Set line colorvoidsetLinePaint(android.graphics.Paint linePaint) Set the line paintvoidsetLineStrokeWidth(float lineStrokeWidth) Set line stroke widthvoidsetMaxFeaturesPerTile(Integer maxFeaturesPerTile) Set the max features per tile.voidsetMaxFeaturesTileDraw(CustomFeaturesTile maxFeaturesTileDraw) Set the max features tile draw, used to draw tiles when more features for a single tile than the max at #getMaxFeaturesPerTile existvoidsetPointIcon(FeatureTilePointIcon pointIcon) Set the point iconvoidsetPointPaint(android.graphics.Paint pointPaint) Set the point paintvoidsetPointRadius(float pointRadius) Set the point radiusvoidsetPolygonAlpha(int polygonAlpha) Set polygon alphavoidsetPolygonColor(int polygonColor) Set polygon colorvoidsetPolygonFillAlpha(int polygonFillAlpha) Set polygon fill alphavoidsetPolygonFillColor(int polygonFillColor) Set polygon fill colorvoidsetPolygonFillPaint(android.graphics.Paint polygonFillPaint) Set the polygon fill paintvoidsetPolygonPaint(android.graphics.Paint polygonPaint) Set the polygon paintvoidsetPolygonStrokeWidth(float polygonStrokeWidth) Set polygon stroke widthvoidsetSimplifyGeometries(boolean simplifyGeometries) Set the simplify geometries flagvoidsetStylePaintCacheSize(int size) Set / resize the style paint cache sizevoidsetTileHeight(int tileHeight) Set the tile heightvoidsetTileWidth(int tileWidth) Set the tile widthvoidsetWidthDrawOverlap(float pixels) Manually set the width draw overlapsimplifyPoints(double simplifyTolerance, List<Point> points) When the simplify tolerance is set, simplify the points to a similar curve with fewer points.
-
Field Details
-
WGS_84_PROJECTION
WGS84 Projection -
WEB_MERCATOR_PROJECTION
Web Mercator Projection -
context
protected final android.content.Context contextContext -
featureDao
Tile data access object -
projection
Feature DAO Projection -
indexManager
When not null, features are retrieved using a feature index -
featureTableStyles
Feature Style extension -
tileWidth
protected int tileWidthTile width -
tileHeight
protected int tileHeightTile height -
compressFormat
protected android.graphics.Bitmap.CompressFormat compressFormatCompress format -
pointRadius
protected float pointRadiusPoint radius -
pointPaint
protected android.graphics.Paint pointPaintPoint paint -
pointIcon
Optional point icon in place of a drawn circle -
linePaint
protected android.graphics.Paint linePaintLine paint -
lineStrokeWidth
protected float lineStrokeWidthLine stroke width -
polygonPaint
protected android.graphics.Paint polygonPaintPolygon paint -
polygonStrokeWidth
protected float polygonStrokeWidthPolygon stroke width -
fillPolygon
protected boolean fillPolygonFill polygon flag -
polygonFillPaint
protected android.graphics.Paint polygonFillPaintPolygon fill paint -
heightOverlap
protected float heightOverlapHeight overlapping pixels between tile images -
widthOverlap
protected float widthOverlapWidth overlapping pixels between tile images -
maxFeaturesPerTile
Optional max features per tile. When more features than this value exist for creating a single tile, the tile is not created -
maxFeaturesTileDraw
When not null and the number of features is greater than the max features per tile, used to draw tiles for those tiles with more features than the max- See Also:
-
simplifyGeometries
protected boolean simplifyGeometriesWhen true, geometries are simplified before being drawn. Default is true -
geodesic
protected boolean geodesicDraw geometries using geodesic lines -
density
protected float densityTile density based upon the device-independent pixelsTileUtils.TILE_DP
-
-
Constructor Details
-
FeatureTiles
Constructor- Parameters:
context- contextfeatureDao- feature dao
-
FeatureTiles
Constructor- Parameters:
context- contextfeatureDao- feature daogeodesic- draw geometries using geodesic lines- Since:
- 6.7.4
-
FeatureTiles
Constructor- Parameters:
context- contextfeatureDao- feature daodensity- display density:DisplayMetrics.density- Since:
- 3.2.0
-
FeatureTiles
public FeatureTiles(android.content.Context context, FeatureDao featureDao, float density, boolean geodesic) Constructor- Parameters:
context- contextfeatureDao- feature daodensity- display density:DisplayMetrics.densitygeodesic- draw geometries using geodesic lines- Since:
- 6.7.4
-
FeatureTiles
Constructor- Parameters:
context- contextfeatureDao- feature daowidth- drawn tile widthheight- drawn tile height- Since:
- 3.2.0
-
FeatureTiles
public FeatureTiles(android.content.Context context, FeatureDao featureDao, int width, int height, boolean geodesic) Constructor- Parameters:
context- contextfeatureDao- feature daowidth- drawn tile widthheight- drawn tile heightgeodesic- draw geometries using geodesic lines- Since:
- 6.7.4
-
FeatureTiles
Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature dao- Since:
- 3.2.0
-
FeatureTiles
public FeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature daogeodesic- draw geometries using geodesic lines- Since:
- 6.7.4
-
FeatureTiles
public FeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature daodensity- display density:DisplayMetrics.density- Since:
- 3.2.0
-
FeatureTiles
public FeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature daodensity- display density:DisplayMetrics.densitygeodesic- draw geometries using geodesic lines- Since:
- 6.7.4
-
FeatureTiles
public FeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature daowidth- drawn tile widthheight- drawn tile height- Since:
- 3.2.0
-
FeatureTiles
public FeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, int width, int height, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature daowidth- drawn tile widthheight- drawn tile heightgeodesic- draw geometries using geodesic lines- Since:
- 6.7.4
-
FeatureTiles
public FeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature daodensity- display density:DisplayMetrics.densitywidth- drawn tile widthheight- drawn tile height- Since:
- 3.2.0
-
FeatureTiles
public FeatureTiles(android.content.Context context, GeoPackage geoPackage, FeatureDao featureDao, float density, int width, int height, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tables- Parameters:
context- contextgeoPackage- GeoPackagefeatureDao- feature daodensity- display density:DisplayMetrics.densitywidth- drawn tile widthheight- drawn tile heightgeodesic- draw geometries using geodesic lines- Since:
- 6.7.4
-
-
Method Details
-
close
public void close()Close the feature tiles connection- Since:
- 1.2.7
-
calculateDrawOverlap
public void calculateDrawOverlap()Call after making changes to the point icon, point radius, or paint stroke widths. Determines the pixel overlap between tiles -
setDensity
public void setDensity(float density) Set the density- Parameters:
density- density- Since:
- 3.2.0
-
getDensity
public float getDensity()Get the density- Returns:
- density
- Since:
- 3.2.0
-
setDrawOverlap
public void setDrawOverlap(float pixels) Manually set the width and height draw overlap- Parameters:
pixels- overlap pixels
-
getWidthDrawOverlap
public float getWidthDrawOverlap()Get the width draw overlap- Returns:
- width pixels
-
setWidthDrawOverlap
public void setWidthDrawOverlap(float pixels) Manually set the width draw overlap- Parameters:
pixels- overlap pixels
-
getHeightDrawOverlap
public float getHeightDrawOverlap()Get the height draw overlap- Returns:
- height pixels
-
setHeightDrawOverlap
public void setHeightDrawOverlap(float pixels) Manually set the height draw overlap- Parameters:
pixels- overlap pixels
-
getFeatureDao
Get the feature DAO- Returns:
- feature dao
-
isIndexQuery
public boolean isIndexQuery()Is index query- Returns:
- true if an index query
-
getIndexManager
Get the index manager- Returns:
- index manager or null
- Since:
- 1.1.0
-
setIndexManager
Set the index- Parameters:
indexManager- index manager- Since:
- 1.1.0
-
getFeatureTableStyles
Get the feature table styles- Returns:
- feature table styles
- Since:
- 3.2.0
-
setFeatureTableStyles
Set the feature table styles- Parameters:
featureTableStyles- feature table styles- Since:
- 3.2.0
-
ignoreFeatureTableStyles
public void ignoreFeatureTableStyles()Ignore the feature table styles within the GeoPackage- Since:
- 3.2.0
-
clearCache
public void clearCache()Clear all caches- Since:
- 3.3.0
-
clearStylePaintCache
public void clearStylePaintCache()Clear the style paint cache- Since:
- 3.2.0
-
setStylePaintCacheSize
public void setStylePaintCacheSize(int size) Set / resize the style paint cache size- Parameters:
size- new size- Since:
- 3.2.0
-
clearIconCache
public void clearIconCache()Clear the icon cache- Since:
- 3.2.0
-
setIconCacheSize
public void setIconCacheSize(int size) Set / resize the icon cache size- Parameters:
size- new size- Since:
- 3.2.0
-
getTileWidth
public int getTileWidth()Get the tile width- Returns:
- tile width
-
setTileWidth
public void setTileWidth(int tileWidth) Set the tile width- Parameters:
tileWidth- tile width
-
getTileHeight
public int getTileHeight()Get the tile height- Returns:
- tile height
-
setTileHeight
public void setTileHeight(int tileHeight) Set the tile height- Parameters:
tileHeight- tile height
-
getCompressFormat
public android.graphics.Bitmap.CompressFormat getCompressFormat()Get the compress format- Returns:
- compress format
-
setCompressFormat
public void setCompressFormat(android.graphics.Bitmap.CompressFormat compressFormat) Set the compress format- Parameters:
compressFormat- compress format
-
getPointRadius
public float getPointRadius()Get the point radius- Returns:
- point radius
-
setPointRadius
public void setPointRadius(float pointRadius) Set the point radius- Parameters:
pointRadius- point radius
-
getPointPaint
public android.graphics.Paint getPointPaint()Get point paint- Returns:
- point paint
-
setPointPaint
public void setPointPaint(android.graphics.Paint pointPaint) Set the point paint- Parameters:
pointPaint- point paint
-
getPointIcon
Get the point icon- Returns:
- point icon
-
setPointIcon
Set the point icon- Parameters:
pointIcon- point icon
-
getLinePaintCopy
public android.graphics.Paint getLinePaintCopy()Get a copy of the line paint, must callsetLinePaint(Paint)to update the paint- Returns:
- line paint
- Since:
- 3.2.0
-
setLinePaint
public void setLinePaint(android.graphics.Paint linePaint) Set the line paint- Parameters:
linePaint- line paint
-
getLineStrokeWidth
public float getLineStrokeWidth()Get line stroke width- Returns:
- width
- Since:
- 3.2.0
-
setLineStrokeWidth
public void setLineStrokeWidth(float lineStrokeWidth) Set line stroke width- Parameters:
lineStrokeWidth- line stroke width- Since:
- 3.2.0
-
getLineColor
public int getLineColor()Get line color- Returns:
- color
- Since:
- 3.2.0
-
setLineColor
public void setLineColor(int lineColor) Set line color- Parameters:
lineColor- line color- Since:
- 3.2.0
-
getLineAlpha
public int getLineAlpha()Get line alpha- Returns:
- alpha
- Since:
- 3.2.0
-
setLineAlpha
public void setLineAlpha(int lineAlpha) Set line alpha- Parameters:
lineAlpha- line alpha- Since:
- 3.2.0
-
getPolygonPaintCopy
public android.graphics.Paint getPolygonPaintCopy()Get a copy of the polygon paint, must callsetPolygonPaint(Paint)to update the paint- Returns:
- polygon paint
- Since:
- 3.2.0
-
setPolygonPaint
public void setPolygonPaint(android.graphics.Paint polygonPaint) Set the polygon paint- Parameters:
polygonPaint- polygon paint
-
getPolygonStrokeWidth
public float getPolygonStrokeWidth()Get polygon stroke width- Returns:
- width
- Since:
- 3.2.0
-
setPolygonStrokeWidth
public void setPolygonStrokeWidth(float polygonStrokeWidth) Set polygon stroke width- Parameters:
polygonStrokeWidth- polygon stroke width- Since:
- 3.2.0
-
getPolygonColor
public int getPolygonColor()Get polygon color- Returns:
- color
- Since:
- 3.2.0
-
setPolygonColor
public void setPolygonColor(int polygonColor) Set polygon color- Parameters:
polygonColor- polygon color- Since:
- 3.2.0
-
getPolygonAlpha
public int getPolygonAlpha()Get polygon alpha- Returns:
- alpha
- Since:
- 3.2.0
-
setPolygonAlpha
public void setPolygonAlpha(int polygonAlpha) Set polygon alpha- Parameters:
polygonAlpha- polygon alpha- Since:
- 3.2.0
-
isFillPolygon
public boolean isFillPolygon()Is fill polygon- Returns:
- fill polygon
-
setFillPolygon
public void setFillPolygon(boolean fillPolygon) Set the fill polygon- Parameters:
fillPolygon- fill polygon
-
getPolygonFillPaintCopy
public android.graphics.Paint getPolygonFillPaintCopy()Get the polygon fill paint- Returns:
- polygon fill paint
- Since:
- 3.2.0
-
setPolygonFillPaint
public void setPolygonFillPaint(android.graphics.Paint polygonFillPaint) Set the polygon fill paint- Parameters:
polygonFillPaint- polygon fill paint
-
getPolygonFillColor
public int getPolygonFillColor()Get polygon fill color- Returns:
- color
- Since:
- 3.2.0
-
setPolygonFillColor
public void setPolygonFillColor(int polygonFillColor) Set polygon fill color- Parameters:
polygonFillColor- polygon fill color- Since:
- 3.2.0
-
getPolygonFillAlpha
public int getPolygonFillAlpha()Get polygon fill alpha- Returns:
- alpha
- Since:
- 3.2.0
-
setPolygonFillAlpha
public void setPolygonFillAlpha(int polygonFillAlpha) Set polygon fill alpha- Parameters:
polygonFillAlpha- polygon fill alpha- Since:
- 3.2.0
-
getMaxFeaturesPerTile
Get the max features per tile- Returns:
- max features per tile or null
- Since:
- 1.1.0
-
setMaxFeaturesPerTile
Set the max features per tile. When more features are returned in a query to create a single tile, the tile is not created.- Parameters:
maxFeaturesPerTile- max features per tile- Since:
- 1.1.0
-
getMaxFeaturesTileDraw
Get the max features tile draw, the custom tile drawing implementation for tiles with more features than the max at #getMaxFeaturesPerTile- Returns:
- max features tile draw or null
- Since:
- 1.1.0
- See Also:
-
setMaxFeaturesTileDraw
Set the max features tile draw, used to draw tiles when more features for a single tile than the max at #getMaxFeaturesPerTile exist- Parameters:
maxFeaturesTileDraw- max features tile draw- Since:
- 1.1.0
- See Also:
-
isSimplifyGeometries
public boolean isSimplifyGeometries()Is the simplify geometries flag set? Default is true- Returns:
- simplify geometries flag
- Since:
- 2.0.0
-
setSimplifyGeometries
public void setSimplifyGeometries(boolean simplifyGeometries) Set the simplify geometries flag- Parameters:
simplifyGeometries- simplify geometries flag- Since:
- 2.0.0
-
isGeodesic
public boolean isGeodesic()Are geometries drawn using geodesic lines? Default is false- Returns:
- geodesic flag
- Since:
- 6.7.4
-
setGeodesic
public void setGeodesic(boolean geodesic) Set the geodestic flag, true to draw geodesic geometries- Parameters:
geodesic- draw geodesic geometries flag- Since:
- 6.7.4
-
drawTileBytes
public byte[] drawTileBytes(int x, int y, int zoom) Draw the tile and get the bytes from the x, y, and zoom level- Parameters:
x- x coordinatey- y coordinatezoom- zoom level- Returns:
- tile bytes, or null
-
drawTile
public android.graphics.Bitmap drawTile(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom level- Parameters:
x- x coordinatey- y coordinatezoom- zoom level- Returns:
- tile bitmap, or null
-
drawTileQueryIndex
public android.graphics.Bitmap drawTileQueryIndex(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom level by querying features in the tile location- Parameters:
x- x coordinatey- y coordinatezoom- zoom level- Returns:
- drawn bitmap, or null
-
queryIndexedFeaturesCount
public long queryIndexedFeaturesCount(int x, int y, int zoom) Query for feature result count in the x, y, and zoom- Parameters:
x- x coordinatey- y coordinatezoom- zoom level- Returns:
- feature count
- Since:
- 1.1.0
-
queryIndexedFeaturesCount
Query for feature result count in the bounding box- Parameters:
webMercatorBoundingBox- web mercator bounding box- Returns:
- feature count
- Since:
- 3.2.0
-
queryIndexedFeatures
Query for feature results in the x, y, and zoom level by querying features in the tile location- Parameters:
x- x coordinatey- y coordinatezoom- zoom level- Returns:
- feature index results
- Since:
- 3.2.0
-
queryIndexedFeatures
Query for feature results in the bounding box- Parameters:
webMercatorBoundingBox- web mercator bounding box- Returns:
- feature index results
- Since:
- 1.1.0
-
expandBoundingBox
Create an expanded bounding box to handle features outside the tile that overlap- Parameters:
boundingBox- bounding boxprojection- bounding box projection- Returns:
- bounding box
- Since:
- 3.2.0
-
expandBoundingBox
Create an expanded bounding box to handle features outside the tile that overlap- Parameters:
webMercatorBoundingBox- web mercator bounding box- Returns:
- bounding box
- Since:
- 3.2.0
-
expandBoundingBox
public BoundingBox expandBoundingBox(BoundingBox webMercatorBoundingBox, BoundingBox tileWebMercatorBoundingBox) Create an expanded bounding box to handle features outside the tile that overlap- Parameters:
webMercatorBoundingBox- web mercator bounding boxtileWebMercatorBoundingBox- tile web mercator bounding box- Returns:
- bounding box
- Since:
- 3.2.0
-
drawTileQueryAll
public android.graphics.Bitmap drawTileQueryAll(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom level by querying all features. This could be very slow if there are a lot of features- Parameters:
x- x coordinatey- y coordinatezoom- zoom level- Returns:
- drawn bitmap, or null
-
createNewBitmap
protected android.graphics.Bitmap createNewBitmap()Create a new empty Bitmap- Returns:
- bitmap
-
getWgs84ToWebMercatorTransform
Create a projection transformation from WGS84 to Web Mercator- Returns:
- transform
-
getProjectionToWebMercatorTransform
Create a projection transformation from provided projection to Web Mercator- Parameters:
projection- projection from- Returns:
- transform
-
simplifyPoints
When the simplify tolerance is set, simplify the points to a similar curve with fewer points.- Parameters:
simplifyTolerance- simplify tolerance in meterspoints- ordered points- Returns:
- simplified points
- Since:
- 2.0.0
-
geodesicPath
When geodesic is enabled, create a geodesic path of points- Parameters:
maxDistance- max distance allowed between path pointspoints- ordered points- Returns:
- geodesic path points
- Since:
- 6.7.4
-
getFeatureStyle
Get the feature style for the feature row and geometry type- Parameters:
featureRow- feature row- Returns:
- feature style
-
getFeatureStyle
Get the feature style for the feature row and geometry type- Parameters:
featureRow- feature rowgeometryType- geometry type- Returns:
- feature style
-
getIcon
Get the icon bitmap from the icon row- Parameters:
iconRow- icon row- Returns:
- icon bitmap
-
getPointPaint
Get the point paint for the feature style, or return the default paint- Parameters:
featureStyle- feature style- Returns:
- paint
-
getLinePaint
Get the line paint for the feature style, or return the default paint- Parameters:
featureStyle- feature style- Returns:
- paint
-
getPolygonPaint
Get the polygon paint for the feature style, or return the default paint- Parameters:
featureStyle- feature style- Returns:
- paint
-
getPolygonFillPaint
Get the polygon fill paint for the feature style, or return the default paint- Parameters:
featureStyle- feature style- Returns:
- paint
-
isTransparent
protected boolean isTransparent(android.graphics.Bitmap bitmap) Determine if the bitmap is a transparent image (must be in expected tile dimensions)- Parameters:
bitmap- bitmap- Returns:
- true if transparent
-
checkIfDrawn
protected android.graphics.Bitmap checkIfDrawn(android.graphics.Bitmap bitmap) Check if the bitmap was drawn upon (non null and not transparent). Return the same bitmap if drawn, else recycle non null bitmaps and return null- Parameters:
bitmap- bitmap- Returns:
- drawn bitmap or null
-
calculateStylePixelBounds
Calculate style pixel bounds- Returns:
- pixel bounds
- Since:
- 6.3.0
-
calculateStylePixelBounds
Calculate style pixel bounds- Parameters:
density- display density:DisplayMetrics.density- Returns:
- pixel bounds
- Since:
- 6.3.0
-
drawTile
public abstract android.graphics.Bitmap drawTile(int zoom, BoundingBox webMercatorBoundingBox, FeatureIndexResults results) Draw a tile bitmap from feature index results- Parameters:
zoom- zoom levelwebMercatorBoundingBox- web mercator bounding boxresults- feature index results- Returns:
- tile
- Since:
- 2.0.0
-
drawTile
public abstract android.graphics.Bitmap drawTile(int zoom, BoundingBox webMercatorBoundingBox, FeatureCursor cursor) Draw a tile bitmap from feature geometries in the provided cursor- Parameters:
zoom- zoom levelwebMercatorBoundingBox- web mercator bounding boxcursor- feature cursor- Returns:
- tile
- Since:
- 2.0.0
-
drawTile
public abstract android.graphics.Bitmap drawTile(int zoom, BoundingBox webMercatorBoundingBox, List<FeatureRow> featureRow) Draw a tile bitmap from the feature rows- Parameters:
zoom- zoom levelwebMercatorBoundingBox- web mercator bounding boxfeatureRow- feature row- Returns:
- tile
- Since:
- 2.0.0
-