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
Modifier and TypeFieldDescriptionprotected Bitmap.CompressFormat
Compress formatprotected final Context
Contextprotected float
Tile density based upon the device-independent pixelsTileUtils.TILE_DP
protected final FeatureDao
Tile data access objectprotected FeatureTableStyles
Feature Style extensionprotected boolean
Fill polygon flagprotected boolean
Draw geometries using geodesic linesprotected float
Height overlapping pixels between tile imagesprotected FeatureIndexManager
When not null, features are retrieved using a feature indexprotected Paint
Line paintprotected float
Line stroke widthprotected Integer
Optional max features per tile.protected CustomFeaturesTile
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 maxprotected FeatureTilePointIcon
Optional point icon in place of a drawn circleprotected Paint
Point paintprotected float
Point radiusprotected Paint
Polygon fill paintprotected Paint
Polygon paintprotected float
Polygon stroke widthprotected Projection
Feature DAO Projectionprotected boolean
When true, geometries are simplified before being drawn.protected int
Tile heightprotected int
Tile widthprotected static final Projection
Web Mercator Projectionprotected static final Projection
WGS84 Projectionprotected float
Width overlapping pixels between tile images -
Constructor Summary
ConstructorDescriptionFeatureTiles
(Context context, FeatureDao featureDao) ConstructorFeatureTiles
(Context context, FeatureDao featureDao, boolean geodesic) ConstructorFeatureTiles
(Context context, FeatureDao featureDao, float density) ConstructorFeatureTiles
(Context context, FeatureDao featureDao, float density, boolean geodesic) ConstructorFeatureTiles
(Context context, FeatureDao featureDao, int width, int height) ConstructorFeatureTiles
(Context context, FeatureDao featureDao, int width, int height, boolean geodesic) ConstructorFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, boolean geodesic) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles
(Context context, GeoPackage geoPackage, FeatureDao featureDao, float density) Constructor, auto creates the index manager for indexed tables and feature styles for styled tablesFeatureTiles
(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
(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
(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
(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
(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 TypeMethodDescriptionvoid
Call after making changes to the point icon, point radius, or paint stroke widths.Calculate style pixel boundscalculateStylePixelBounds
(float density) Calculate style pixel boundsprotected Bitmap
checkIfDrawn
(Bitmap bitmap) Check if the bitmap was drawn upon (non null and not transparent).void
Clear all cachesvoid
Clear the icon cachevoid
Clear the style paint cachevoid
close()
Close the feature tiles connectionprotected Bitmap
Create a new empty BitmapdrawTile
(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom levelabstract Bitmap
drawTile
(int zoom, BoundingBox webMercatorBoundingBox, List<FeatureRow> featureRow) Draw a tile bitmap from the feature rowsabstract Bitmap
drawTile
(int zoom, BoundingBox webMercatorBoundingBox, FeatureIndexResults results) Draw a tile bitmap from feature index resultsabstract Bitmap
drawTile
(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 leveldrawTileQueryAll
(int x, int y, int zoom) Draw a tile bitmap from the x, y, and zoom level by querying all features.drawTileQueryIndex
(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 pointsGet the compress formatfloat
Get the densityGet the feature DAOprotected FeatureStyle
getFeatureStyle
(FeatureRow featureRow) Get the feature style for the feature row and geometry typeprotected FeatureStyle
getFeatureStyle
(FeatureRow featureRow, GeometryType geometryType) Get the feature style for the feature row and geometry typeGet the feature table stylesfloat
Get the height draw overlapprotected Bitmap
Get the icon bitmap from the icon rowGet the index managerint
Get line alphaint
Get line colorprotected Paint
getLinePaint
(FeatureStyle featureStyle) Get the line paint for the feature style, or return the default paintGet a copy of the line paint, must callsetLinePaint(Paint)
to update the paintfloat
Get 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 iconGet point paintprotected Paint
getPointPaint
(FeatureStyle featureStyle) Get the point paint for the feature style, or return the default paintfloat
Get the point radiusint
Get polygon alphaint
Get polygon colorint
Get polygon fill alphaint
Get polygon fill colorprotected Paint
getPolygonFillPaint
(FeatureStyle featureStyle) Get the polygon fill paint for the feature style, or return the default paintGet the polygon fill paintprotected Paint
getPolygonPaint
(FeatureStyle featureStyle) Get the polygon paint for the feature style, or return the default paintGet a copy of the polygon paint, must callsetPolygonPaint(Paint)
to update the paintfloat
Get polygon stroke widthprotected GeometryTransform
getProjectionToWebMercatorTransform
(Projection projection) Create a projection transformation from provided projection to Web Mercatorint
Get the tile heightint
Get the tile widthprotected ProjectionTransform
Create a projection transformation from WGS84 to Web Mercatorfloat
Get the width draw overlapvoid
Ignore the feature table styles within the GeoPackageboolean
Is fill polygonboolean
Are geometries drawn using geodesic lines? Default is falseboolean
Is index queryboolean
Is the simplify geometries flag set? Default is trueprotected boolean
isTransparent
(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 boxlong
queryIndexedFeaturesCount
(int x, int y, int zoom) Query for feature result count in the x, y, and zoomlong
queryIndexedFeaturesCount
(BoundingBox webMercatorBoundingBox) Query for feature result count in the bounding boxvoid
setCompressFormat
(Bitmap.CompressFormat compressFormat) Set the compress formatvoid
setDensity
(float density) Set the densityvoid
setDrawOverlap
(float pixels) Manually set the width and height draw overlapvoid
setFeatureTableStyles
(FeatureTableStyles featureTableStyles) Set the feature table stylesvoid
setFillPolygon
(boolean fillPolygon) Set the fill polygonvoid
setGeodesic
(boolean geodesic) Set the geodestic flag, true to draw geodesic geometriesvoid
setHeightDrawOverlap
(float pixels) Manually set the height draw overlapvoid
setIconCacheSize
(int size) Set / resize the icon cache sizevoid
setIndexManager
(FeatureIndexManager indexManager) Set the indexvoid
setLineAlpha
(int lineAlpha) Set line alphavoid
setLineColor
(int lineColor) Set line colorvoid
setLinePaint
(Paint linePaint) Set the line paintvoid
setLineStrokeWidth
(float lineStrokeWidth) Set line stroke widthvoid
setMaxFeaturesPerTile
(Integer maxFeaturesPerTile) Set the max features per tile.void
setMaxFeaturesTileDraw
(CustomFeaturesTile maxFeaturesTileDraw) Set the max features tile draw, used to draw tiles when more features for a single tile than the max at #getMaxFeaturesPerTile existvoid
setPointIcon
(FeatureTilePointIcon pointIcon) Set the point iconvoid
setPointPaint
(Paint pointPaint) Set the point paintvoid
setPointRadius
(float pointRadius) Set the point radiusvoid
setPolygonAlpha
(int polygonAlpha) Set polygon alphavoid
setPolygonColor
(int polygonColor) Set polygon colorvoid
setPolygonFillAlpha
(int polygonFillAlpha) Set polygon fill alphavoid
setPolygonFillColor
(int polygonFillColor) Set polygon fill colorvoid
setPolygonFillPaint
(Paint polygonFillPaint) Set the polygon fill paintvoid
setPolygonPaint
(Paint polygonPaint) Set the polygon paintvoid
setPolygonStrokeWidth
(float polygonStrokeWidth) Set polygon stroke widthvoid
setSimplifyGeometries
(boolean simplifyGeometries) Set the simplify geometries flagvoid
setStylePaintCacheSize
(int size) Set / resize the style paint cache sizevoid
setTileHeight
(int tileHeight) Set the tile heightvoid
setTileWidth
(int tileWidth) Set the tile widthvoid
setWidthDrawOverlap
(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
Context -
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
Compress format -
pointRadius
protected float pointRadiusPoint radius -
pointPaint
Point paint -
pointIcon
Optional point icon in place of a drawn circle -
linePaint
Line paint -
lineStrokeWidth
protected float lineStrokeWidthLine stroke width -
polygonPaint
Polygon paint -
polygonStrokeWidth
protected float polygonStrokeWidthPolygon stroke width -
fillPolygon
protected boolean fillPolygonFill polygon flag -
polygonFillPaint
Polygon 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 -
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
Constructor- Parameters:
context
- contextfeatureDao
- feature daodensity
- display density:DisplayMetrics.density
geodesic
- 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(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(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
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(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.density
geodesic
- draw geometries using geodesic lines- Since:
- 6.7.4
-
FeatureTiles
public FeatureTiles(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(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(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.density
width
- drawn tile widthheight
- drawn tile height- Since:
- 3.2.0
-
FeatureTiles
public FeatureTiles(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.density
width
- 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
Get the compress format- Returns:
- compress format
-
setCompressFormat
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
Get point paint- Returns:
- point paint
-
setPointPaint
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
Get a copy of the line paint, must callsetLinePaint(Paint)
to update the paint- Returns:
- line paint
- Since:
- 3.2.0
-
setLinePaint
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
Get a copy of the polygon paint, must callsetPolygonPaint(Paint)
to update the paint- Returns:
- polygon paint
- Since:
- 3.2.0
-
setPolygonPaint
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
Get the polygon fill paint- Returns:
- polygon fill paint
- Since:
- 3.2.0
-
setPolygonFillPaint
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
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
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
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
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
Determine if the bitmap is a transparent image (must be in expected tile dimensions)- Parameters:
bitmap
- bitmap- Returns:
- true if transparent
-
checkIfDrawn
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 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
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 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
-