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 interfaceMVTTile.LayerShowerA class used to set the layers that an MVTTile will show.static interfaceMVTTile.TileListenerA class that can be notified that a tile has finished loading
-
Field Summary
Fields Modifier and Type Field Description private BBoxbbox(package private) static java.awt.image.BufferedImageCLEAR_LOADEDprivate intextentprivate java.util.Collection<Layer>layersprivate ListenerList<MVTTile.TileListener>listenerListprivate VectorDataStorevectorDataStore
-
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 voidaddTileLoaderFinisher(MVTTile.TileListener listener)Add a tile loader finisher listenerBBoxgetBBox()Fetches the bounding box of the primitive.VectorDataStoregetData()Get the datastore for this tileintgetExtent()Get the extent of the tile (in pixels)java.util.Collection<Layer>getLayers()Get the layers for this vector tilevoidloadImage(java.io.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
-
extent
private int extent
-
CLEAR_LOADED
static final java.awt.image.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(java.io.InputStream inputStream) throws java.io.IOException
- Overrides:
loadImagein classorg.openstreetmap.gui.jmapviewer.Tile- Throws:
java.io.IOException
-
getLayers
public java.util.Collection<Layer> getLayers()
Description copied from interface:VectorTileGet the layers for this vector tile- Specified by:
getLayersin interfaceVectorTile- Returns:
- A collection of layers
-
getExtent
public int getExtent()
Description copied from interface:VectorTileGet the extent of the tile (in pixels)- Specified by:
getExtentin 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:IQuadBucketTypeFetches the bounding box of the primitive.- Specified by:
getBBoxin interfaceIQuadBucketType- Returns:
- Bounding box of the object
-
getData
public VectorDataStore getData()
Get the datastore for this tile- Returns:
- The data
-
-