Class CompositeOverlay
- java.lang.Object
-
- mil.nga.geopackage.map.tiles.overlay.BoundedOverlay
-
- mil.nga.geopackage.map.tiles.overlay.CompositeOverlay
-
- All Implemented Interfaces:
TileProvider
public class CompositeOverlay extends BoundedOverlay
Composite overlay comprised of multiple overlays, checking each in order for a tile
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.map.tiles.overlay.BoundedOverlay
webMercatorBoundingBox
-
Fields inherited from interface com.google.android.gms.maps.model.TileProvider
NO_TILE
-
-
Constructor Summary
Constructors Constructor Description CompositeOverlay()ConstructorCompositeOverlay(Collection<BoundedOverlay> overlays)ConstructorCompositeOverlay(BoundedOverlay overlay)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOverlay(BoundedOverlay overlay)Add an overlayvoidaddOverlays(Collection<BoundedOverlay> overlays)Add overlaysvoidclearOverlays()Clear the overlaysprotected booleanhasTileToRetrieve(int x, int y, int zoom)Check if there is a tile to retrieveprotected TileretrieveTile(int x, int y, int zoom)Retrieve the tile-
Methods inherited from class mil.nga.geopackage.map.tiles.overlay.BoundedOverlay
getBoundingBox, getMaxZoom, getMinZoom, getTile, getWebMercatorBoundingBox, getWebMercatorBoundingBox, hasTile, isWithinBoundingBox, isWithinBounds, isWithinZoom, setBoundingBox, setMaxZoom, setMinZoom
-
-
-
-
Constructor Detail
-
CompositeOverlay
public CompositeOverlay()
Constructor
-
CompositeOverlay
public CompositeOverlay(BoundedOverlay overlay)
Constructor- Parameters:
overlay- first overlay
-
CompositeOverlay
public CompositeOverlay(Collection<BoundedOverlay> overlays)
Constructor- Parameters:
overlays- ordered overlays
-
-
Method Detail
-
addOverlay
public void addOverlay(BoundedOverlay overlay)
Add an overlay- Parameters:
overlay- bounded overlay
-
addOverlays
public void addOverlays(Collection<BoundedOverlay> overlays)
Add overlays- Parameters:
overlays- ordered overlays
-
clearOverlays
public void clearOverlays()
Clear the overlays
-
hasTileToRetrieve
protected boolean hasTileToRetrieve(int x, int y, int zoom)Check if there is a tile to retrieve- Specified by:
hasTileToRetrievein classBoundedOverlay- Parameters:
x- x coordinatey- y coordinatezoom- zoom value- Returns:
- true if there is a tile
-
retrieveTile
protected Tile retrieveTile(int x, int y, int zoom)
Retrieve the tile- Specified by:
retrieveTilein classBoundedOverlay- Parameters:
x- x coordinatey- y coordinatezoom- zoom value- Returns:
- tile
-
-