本文整理汇总了Java中org.osmdroid.tileprovider.modules.TileWriter类的典型用法代码示例。如果您正苦于以下问题:Java TileWriter类的具体用法?Java TileWriter怎么用?Java TileWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TileWriter类属于org.osmdroid.tileprovider.modules包,在下文中一共展示了TileWriter类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CycleMapTileProvider
import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
private CycleMapTileProvider(final Context context,
final ITileSource tileSource,
final IRegisterReceiver registerReceiver) {
super(tileSource, registerReceiver);
final MapTileFilesystemProvider fileSystemProvider =
new MapTileFilesystemProvider(registerReceiver, tileSource);
mTileProviderList.add(fileSystemProvider);
final NetworkAvailabliltyCheck networkCheck = new NetworkAvailabliltyCheck(context);
final MapTileDownloader downloaderProvider =
new MapTileDownloader(tileSource,
new TileWriter(),
networkCheck);
mTileProviderList.add(downloaderProvider);
final MapsforgeOSMDroidTileProvider mapsforgeProvider =
new MapsforgeOSMDroidTileProvider(tileSource, networkCheck);
mTileProviderList.add(mapsforgeProvider);
}
示例2: WMSMapTileProviderBasic
import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
/**
* Creates a {@link MapTileProviderBasic}.
*/
public WMSMapTileProviderBasic(final IRegisterReceiver pRegisterReceiver,
final INetworkAvailablityCheck aNetworkAvailablityCheck,
final ITileSource pTileSource) {
super(pTileSource, pRegisterReceiver);
final TileWriter tileWriter = new TileWriter();
final MapTileFilesystemProvider fileSystemProvider = new MapTileFilesystemProvider(
pRegisterReceiver, pTileSource);
mTileProviderList.add(fileSystemProvider);
final MapTileFileArchiveProvider archiveProvider = new MapTileFileArchiveProvider(
pRegisterReceiver, pTileSource);
mTileProviderList.add(archiveProvider);
final WMSMapTileDownloader downloaderProvider = new WMSMapTileDownloader(
pTileSource, tileWriter, aNetworkAvailablityCheck);
mTileProviderList.add(downloaderProvider);
}
示例3: getMapTileDownloader
import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
private MapTileDownloader getMapTileDownloader(final ITileSource tileSource) {
// Create a file cache modular provider
//FIXME: Der Cache-Mechanismus speichert die Tiles unter "/osmdroid/<kartenname>". Dies sollte man unterbinden,
// da es evtl zu Konflikten mit Apps kommt, die auch osmdroid verwenden!
final TileWriter tileWriter = new TileWriter();
// Create a download modular tile provider
final NetworkAvailabliltyCheck networkAvailabliltyCheck = new NetworkAvailabliltyCheck(context);
//ACHTUNG: Der Downloader funktioniert aktuell nur mit dem FilesystemProvider ordnungsgemäß!! Eigenständig
// funkioniert dieser nicht! Es liegt daran, dass die überschriebene Methode "tileLoaded" in der internen
// TileLoader-Klasse nicht dafür vorgesehen ist. Es funktioniert allerdings, wenn man die überschriebene
// Methode nicht überschreibt!
final MapTileDownloader downloaderProvider =
new MapTileDownloader(tileSource, tileWriter, networkAvailabliltyCheck);
return downloaderProvider;
}
示例4: GeoPackageFeatureTileProvider
import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
public GeoPackageFeatureTileProvider(ITileSource pTileSource) {
super(pTileSource);
Log.i(IMapView.LOGTAG, "Geopackage support is BETA. Please report any issues");
if (Build.VERSION.SDK_INT < 10) {
tileWriter = new TileWriter();
} else {
tileWriter = new SqlTileWriter();
}
}
示例5: MapTileProviderTTbox
import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
/**
* Creates a {@link MapTileProviderTTbox}.
*/
public MapTileProviderTTbox(final Context pContext, final IRegisterReceiver pRegisterReceiver, final INetworkAvailablityCheck aNetworkAvailablityCheck, final ITileSource pTileSource,
int cacheSizeInBytes) {
super(pTileSource, pRegisterReceiver, cacheSizeInBytes);
this.context = pContext;
// super(pTileSource, pRegisterReceiver);
final TileWriter tileWriter = new TileWriter();
final MapTileFilesystemProviderTTbox fileSystemProvider = new MapTileFilesystemProviderTTbox(pRegisterReceiver, pTileSource, OpenStreetMapTileProviderConstants.ONE_WEEK * 26,
aNetworkAvailablityCheck);
// final MapTileFilesystemProvider fileSystemProvider = new
// MapTileFilesystemProvider(pRegisterReceiver, pTileSource,
// OpenStreetMapTileProviderConstants.ONE_WEEK );
mTileProviderList.add(fileSystemProvider);
// final MapTileFileArchiveProvider archiveProvider = new
// MapTileFileArchiveProvider(
// pRegisterReceiver, pTileSource);
// mTileProviderList.add(archiveProvider);
final MapTileSpdyDownloaderTTbox downloaderProvider = new MapTileSpdyDownloaderTTbox(pTileSource, tileWriter, aNetworkAvailablityCheck);
mTileProviderList.add(downloaderProvider);
// Memory Management
initMemoryListener(pContext);
}
示例6: createMapOBSO
import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
private void createMapOBSO() {
final Context context = this;
final Context applicationContext = context.getApplicationContext();
final IRegisterReceiver registerReceiver = new SimpleRegisterReceiver(applicationContext);
// Create a custom tile source
final ITileSource tileSource = new XYTileSource("Mapnik", ResourceProxy.string.mapnik, 1, 18, 256, ".png", "http://tile.openstreetmap.org/");
// Create a file cache modular provider
final TileWriter tileWriter = new TileWriter();
final MapTileFilesystemProvider fileSystemProvider = new MapTileFilesystemProvider(registerReceiver, tileSource);
// Create an archive file modular tile provider
//GEMFFileArchive gemfFileArchive = GEMFFileArchive.getGEMFFileArchive(mGemfArchiveFilename ); // Requires try/catch
//MapTileFileArchiveProvider fileArchiveProvider = new MapTileFileArchiveProvider(registerReceiver, tileSource, new IArchiveFile[] { gemfFileArchive });
// Create a download modular tile provider
final NetworkAvailabliltyCheck networkAvailabliltyCheck = new NetworkAvailabliltyCheck(context);
final MapTileDownloader downloaderProvider = new MapTileDownloader(tileSource, tileWriter, networkAvailabliltyCheck);
// Create a custom tile provider array with the custom tile source and the custom tile providers
//final MapTileProviderArray tileProviderArray = new MapTileProviderArray(tileSource, registerReceiver, new MapTileModuleProviderBase[] { fileSystemProvider, fileArchiveProvider, downloaderProvider });
final MapTileProviderArray tileProviderArray = new MapTileProviderArray(tileSource, registerReceiver, new MapTileModuleProviderBase[] { fileSystemProvider, downloaderProvider });
//final MapTileProviderArray tileProviderArray = new MapTileProviderArray(tileSource, registerReceiver, new MapTileModuleProviderBase[] { downloaderProvider });
// Create the mapview with the custom tile provider array
//mMapView = new MapView(context, 256, new DefaultResourceProxyImpl(context), tileProviderArray);
MapView mMapView = (MapView) findViewById(R.id.mapview);
mMapView.setTileSource(tileSource);
}
示例7: CacheManager
import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
public CacheManager(final MapView mapView){
mTileProvider = mapView.getTileProvider();
mTileWriter = new TileWriter();
mMapView = mapView;
}