• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TileWriter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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);
}
 
开发者ID:MobileAppCodes,项目名称:CycleStreets-Android-app-,代码行数:22,代码来源:TileSource.java


示例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);
}
 
开发者ID:ABAKUS-ST,项目名称:StrazakOSM,代码行数:23,代码来源:WMSMapTileProviderBasic.java


示例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;
}
 
开发者ID:tarent,项目名称:invio,代码行数:16,代码来源:TileProviderFactory.java


示例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();
    }
}
 
开发者ID:osmdroid,项目名称:osmdroid,代码行数:11,代码来源:GeoPackageFeatureTileProvider.java


示例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);
}
 
开发者ID:gabuzomeu,项目名称:osmLib,代码行数:31,代码来源:MapTileProviderTTbox.java


示例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);        

}
 
开发者ID:alain75007,项目名称:androidschool,代码行数:32,代码来源:GameActivity.java


示例7: CacheManager

import org.osmdroid.tileprovider.modules.TileWriter; //导入依赖的package包/类
public CacheManager(final MapView mapView){
	mTileProvider = mapView.getTileProvider();
	mTileWriter = new TileWriter();
	mMapView = mapView;
}
 
开发者ID:jeffallen,项目名称:MarshrutMe,代码行数:6,代码来源:CacheManager.java



注:本文中的org.osmdroid.tileprovider.modules.TileWriter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ASTVisitor类代码示例发布时间:2022-05-22
下一篇:
Java Speakers类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap