本文整理汇总了Java中org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener类的典型用法代码示例。如果您正苦于以下问题:Java TileLoaderListener类的具体用法?Java TileLoaderListener怎么用?Java TileLoaderListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TileLoaderListener类属于org.openstreetmap.gui.jmapviewer.interfaces包,在下文中一共展示了TileLoaderListener类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OsmTileLoader
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
public OsmTileLoader(TileLoaderListener listener, Map<String, String> headers) {
this.headers.put("Accept", "text/html, image/png, image/jpeg, image/gif, */*");
if (headers != null) {
this.headers.putAll(headers);
}
this.listener = listener;
}
示例2: OsmFileCacheTileLoader
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
/**
* Create a OSMFileCacheTileLoader with given cache directory.
* If cacheDir is not set or invalid, IOException will be thrown.
* @param map the listener checking for tile load events (usually the map for display)
* @param cacheDir directory to store cached tiles
*/
public OsmFileCacheTileLoader(TileLoaderListener map, File cacheDir) throws IOException {
super(map);
if (cacheDir == null || (!cacheDir.exists() && !cacheDir.mkdirs()))
throw new IOException("Cannot access cache directory");
log.finest("Tile cache directory: " + cacheDir);
cacheDirBase = cacheDir.getAbsolutePath();
sourceCacheDirMap = new HashMap<>();
}
示例3: TileController
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
public TileController(TileSource source, TileCache tileCache, TileLoaderListener listener) {
this.tileSource = source;
this.tileLoader = new OsmTileLoader(listener);
this.tileCache = tileCache;
}
示例4: TileController
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
public TileController(TileSource source, TileCache tileCache, TileLoaderListener listener) {
tileSource = new OsmTileSource.Mapnik();
tileLoader = new OsmTileLoader(listener);
this.tileCache = tileCache;
jobDispatcher = JobDispatcher.getInstance();
}
示例5: OsmTileLoader
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
public OsmTileLoader(TileLoaderListener listener) {
headers.put("Accept", "text/html, image/png, image/jpeg, image/gif, */*");
this.listener = listener;
}
示例6: makeTileLoader
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
@Override
public TileLoader makeTileLoader(TileLoaderListener listener, Map<String, String> headers) {
return new MbtilesTileLoader(listener, this.connection);
}
示例7: MbtilesTileLoader
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
public MbtilesTileLoader(TileLoaderListener listener, Connection conn) {
super(listener);
this.connection = conn;
}
示例8: TileStoreLoader
import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener; //导入依赖的package包/类
/**
* Constructor
*
* @param tileStore
* Tile store reader
* @param listener
* Callback mechanism to report tile loader status
* @throws TileStoreException
* Thrown when there's an error in the underlying tile store implementation
*/
public TileStoreLoader(final TileStoreReader tileStore, final TileLoaderListener listener) throws TileStoreException
{
this.tileStore = tileStore;
this.crsProfile = CrsProfileFactory.create(tileStore.getCoordinateReferenceSystem());
this.listener = listener;
this.minimumZoomLevel = tileStore.getZoomLevels().stream().min(Integer::compare).orElse(-1);
this.maximumZoomLevel = tileStore.getZoomLevels().stream().max(Integer::compare).orElse(-1);
}