Class BoundedOverlay
java.lang.Object
mil.nga.geopackage.map.tiles.overlay.BoundedOverlay
- All Implemented Interfaces:
TileProvider
- Direct Known Subclasses:
CompositeOverlay
,FeatureOverlay
,GeoPackageOverlay
,XYZGeoPackageOverlay
Abstract overlay which provides bounding returned tiles by zoom levels and/or a bounding box
- Since:
- 1.2.5
-
Field Summary
Fields inherited from interface com.google.android.gms.maps.model.TileProvider
NO_TILE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBoundingBox
(Projection projection) Get the bounding box as the provided projectionGet the max zoomGet the min zoomgetTile
(int x, int y, int zoom) Get the web mercator bounding boxprotected BoundingBox
getWebMercatorBoundingBox
(BoundingBox requestWebMercatorBoundingBox) Get the bounded overlay web mercator bounding box expanded as needed by the requested bounding box dimensionsboolean
hasTile
(int x, int y, int zoom) Determine if there is a tile for the x, y, and zoomprotected abstract boolean
hasTileToRetrieve
(int x, int y, int zoom) Check if there is a tile to retrieveboolean
isWithinBoundingBox
(int x, int y, int zoom) Check if the tile request is within the desired tile boundsboolean
isWithinBounds
(int x, int y, int zoom) Is the tile within the zoom and bounding box boundsboolean
isWithinZoom
(float zoom) Check if the zoom is within the overlay zoom rangeprotected abstract Tile
retrieveTile
(int x, int y, int zoom) Retrieve the tilevoid
setBoundingBox
(BoundingBox boundingBox, Projection projection) Set the bounding box, provided as the indicated projectionvoid
setMaxZoom
(Integer maxZoom) Set the max zoomvoid
setMinZoom
(Integer minZoom) Set the min zoom
-
Field Details
-
webMercatorBoundingBox
Web mercator bounding box
-
-
Constructor Details
-
BoundedOverlay
public BoundedOverlay()Constructor
-
-
Method Details
-
getMinZoom
Get the min zoom- Returns:
- min zoom
-
setMinZoom
Set the min zoom- Parameters:
minZoom
- min zoom
-
getMaxZoom
Get the max zoom- Returns:
- max zoom
-
setMaxZoom
Set the max zoom- Parameters:
maxZoom
- max zoom
-
setBoundingBox
Set the bounding box, provided as the indicated projection- Parameters:
boundingBox
- bounding boxprojection
- projection
-
getWebMercatorBoundingBox
Get the web mercator bounding box- Returns:
- bounding box
-
getBoundingBox
Get the bounding box as the provided projection- Parameters:
projection
- projection- Returns:
- bounding box
-
getWebMercatorBoundingBox
Get the bounded overlay web mercator bounding box expanded as needed by the requested bounding box dimensions- Parameters:
requestWebMercatorBoundingBox
- requested web mercator bounding box- Returns:
- web mercator bounding box
-
getTile
- Specified by:
getTile
in interfaceTileProvider
-
hasTile
public boolean hasTile(int x, int y, int zoom) Determine if there is a tile for the x, y, and zoom- Parameters:
x
- x coordinatey
- y coordinatezoom
- zoom value- Returns:
- true if there is a tile
- Since:
- 1.2.6
-
hasTileToRetrieve
protected abstract boolean hasTileToRetrieve(int x, int y, int zoom) Check if there is a tile to retrieve- Parameters:
x
- x coordinatey
- y coordinatezoom
- zoom value- Returns:
- true if there is a tile
-
retrieveTile
Retrieve the tile- Parameters:
x
- x coordinatey
- y coordinatezoom
- zoom value- Returns:
- tile
-
isWithinBounds
public boolean isWithinBounds(int x, int y, int zoom) Is the tile within the zoom and bounding box bounds- Parameters:
x
- x coordinatey
- y coordinatezoom
- zoom value- Returns:
- true if within bounds
-
isWithinZoom
public boolean isWithinZoom(float zoom) Check if the zoom is within the overlay zoom range- Parameters:
zoom
- zoom value- Returns:
- true if within zoom
-
isWithinBoundingBox
public boolean isWithinBoundingBox(int x, int y, int zoom) Check if the tile request is within the desired tile bounds- Parameters:
x
- x coordinatey
- y coordinatezoom
- zoom value- Returns:
- true if within bounds
-