Class MVTTile
- java.lang.Object
-
- org.openstreetmap.gui.jmapviewer.Tile
-
- org.openstreetmap.josm.data.imagery.vectortile.mapbox.MVTTile
-
- All Implemented Interfaces:
VectorTile
,IQuadBucketType
public class MVTTile extends org.openstreetmap.gui.jmapviewer.Tile implements VectorTile, IQuadBucketType
A class for Mapbox Vector Tiles- Since:
- 17862
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MVTTile.LayerShower
A class used to set the layers that an MVTTile will show.static interface
MVTTile.TileListener
A class that can be notified that a tile has finished loading
-
Field Summary
Fields Modifier and Type Field Description private BBox
bbox
(package private) static BufferedImage
CLEAR_LOADED
private int
extent
private Collection<Layer>
layers
private ListenerList<MVTTile.TileListener>
listenerList
private VectorDataStore
vectorDataStore
-
Constructor Summary
Constructors Constructor Description MVTTile(org.openstreetmap.gui.jmapviewer.interfaces.TileSource source, int xtile, int ytile, int zoom)
Create a new Tile
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTileLoaderFinisher(MVTTile.TileListener listener)
Add a tile loader finisher listenerBBox
getBBox()
Fetches the bounding box of the primitive.VectorDataStore
getData()
Get the datastore for this tileint
getExtent()
Get the extent of the tile (in pixels)Collection<Layer>
getLayers()
Get the layers for this vector tilevoid
loadImage(InputStream inputStream)
-
Methods inherited from class org.openstreetmap.gui.jmapviewer.Tile
equals, finishLoading, getErrorMessage, getImage, getKey, getMetadata, getSource, getStatus, getTileKey, getTileSource, getTileXY, getUrl, getValue, getXtile, getYtile, getZoom, hasError, hashCode, initLoading, isLoaded, isLoading, loadingCanceled, loadPlaceholderFromCache, paint, paint, putValue, setError, setError, setImage, setLoaded, toString
-
-
-
-
Field Detail
-
listenerList
private final ListenerList<MVTTile.TileListener> listenerList
-
layers
private Collection<Layer> layers
-
extent
private int extent
-
CLEAR_LOADED
static final BufferedImage CLEAR_LOADED
-
vectorDataStore
private VectorDataStore vectorDataStore
-
-
Constructor Detail
-
MVTTile
public MVTTile(org.openstreetmap.gui.jmapviewer.interfaces.TileSource source, int xtile, int ytile, int zoom)
Create a new Tile- Parameters:
source
- The source of the tilextile
- The x coordinate for the tileytile
- The y coordinate for the tilezoom
- The zoom for the tile
-
-
Method Detail
-
loadImage
public void loadImage(InputStream inputStream) throws IOException
- Overrides:
loadImage
in classorg.openstreetmap.gui.jmapviewer.Tile
- Throws:
IOException
-
getLayers
public Collection<Layer> getLayers()
Description copied from interface:VectorTile
Get the layers for this vector tile- Specified by:
getLayers
in interfaceVectorTile
- Returns:
- A collection of layers
-
getExtent
public int getExtent()
Description copied from interface:VectorTile
Get the extent of the tile (in pixels)- Specified by:
getExtent
in interfaceVectorTile
- Returns:
- The tile extent (pixels)
-
addTileLoaderFinisher
public void addTileLoaderFinisher(MVTTile.TileListener listener)
Add a tile loader finisher listener- Parameters:
listener
- The listener to add
-
getBBox
public BBox getBBox()
Description copied from interface:IQuadBucketType
Fetches the bounding box of the primitive.- Specified by:
getBBox
in interfaceIQuadBucketType
- Returns:
- Bounding box of the object
-
getData
public VectorDataStore getData()
Get the datastore for this tile- Returns:
- The data
-
-