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

Java NetworkAvailabliltyCheck类代码示例

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

本文整理汇总了Java中org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck的典型用法代码示例。如果您正苦于以下问题:Java NetworkAvailabliltyCheck类的具体用法?Java NetworkAvailabliltyCheck怎么用?Java NetworkAvailabliltyCheck使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NetworkAvailabliltyCheck类属于org.osmdroid.tileprovider.modules包,在下文中一共展示了NetworkAvailabliltyCheck类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: CycleMapTileProvider

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的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: getMapTileDownloader

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的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


示例3: MapsforgeOSMDroidTileProvider

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的package包/类
public MapsforgeOSMDroidTileProvider(final ITileSource fallbackSource,
                     final NetworkAvailabliltyCheck networkCheck)
{
  super(NUMBER_OF_TILE_DOWNLOAD_THREADS, TILE_DOWNLOAD_MAXIMUM_QUEUE_SIZE);
  tileSource_ = null;
  fallbackTileSource_ = fallbackSource instanceof OnlineTileSourceBase ? (OnlineTileSourceBase)fallbackSource : null;
  networkCheck_ = networkCheck;
}
 
开发者ID:MobileAppCodes,项目名称:CycleStreets-Android-app-,代码行数:9,代码来源:MapsforgeOSMDroidTileProvider.java


示例4: createMapOBSO

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的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


示例5: SafeMapTileProviderBasic

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的package包/类
/**
 * Creates a {@link SafeMapTileProviderBasic}.
 */
public SafeMapTileProviderBasic(final Context pContext, final ITileSource pTileSource) {
	this(pContext, new SimpleRegisterReceiver(pContext), new NetworkAvailabliltyCheck(pContext),
			pTileSource);
}
 
开发者ID:microg,项目名称:android_frameworks_mapsv1,代码行数:8,代码来源:SafeMapTileProviderBasic.java


示例6: MapTileProviderBasic

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的package包/类
/**
 * Creates a {@link MapTileProviderBasic}.
 */
public MapTileProviderBasic(final Context pContext, final ITileSource pTileSource) {
	this(new SimpleRegisterReceiver(pContext), new NetworkAvailabliltyCheck(pContext),
			pTileSource, pContext,null);
}
 
开发者ID:osmdroid,项目名称:osmdroid,代码行数:8,代码来源:MapTileProviderBasic.java


示例7: GeoPackageProvider

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的package包/类
public GeoPackageProvider(File[] db, Context context) {
    this(new SimpleRegisterReceiver(context), new NetworkAvailabliltyCheck(context),
        TileSourceFactory.DEFAULT_TILE_SOURCE, context, null, db);
}
 
开发者ID:osmdroid,项目名称:osmdroid,代码行数:5,代码来源:GeoPackageProvider.java


示例8: WMSMapTileProviderBasic

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的package包/类
/**
 * Creates a {@link MapTileProviderBasic}.
 */
public WMSMapTileProviderBasic(final Context pContext,
		final ITileSource pTileSource) {
	this(new SimpleRegisterReceiver(pContext),
			new NetworkAvailabliltyCheck(pContext), pTileSource);
}
 
开发者ID:ABAKUS-ST,项目名称:StrazakOSM,代码行数:9,代码来源:WMSMapTileProviderBasic.java


示例9: MapTileProviderLocal

import org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck; //导入依赖的package包/类
/**
 * @param pContext
 * @param pTileSource
 */
public MapTileProviderLocal(String basePath, Context pContext, ITileSource pTileSource) {
	this(basePath, new SimpleRegisterReceiver(pContext), new NetworkAvailabliltyCheck(pContext), pTileSource);

}
 
开发者ID:gandulf,项目名称:DsaTab,代码行数:9,代码来源:MapTileProviderLocal.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java HighPerformanceLineVertexBufferObject类代码示例发布时间:2022-05-22
下一篇:
Java X509Certificate类代码示例发布时间: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