当前位置: 首页>>代码示例>>Java>>正文


Java InternalRenderTheme.DEFAULT属性代码示例

本文整理汇总了Java中org.mapsforge.map.rendertheme.InternalRenderTheme.DEFAULT属性的典型用法代码示例。如果您正苦于以下问题:Java InternalRenderTheme.DEFAULT属性的具体用法?Java InternalRenderTheme.DEFAULT怎么用?Java InternalRenderTheme.DEFAULT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.mapsforge.map.rendertheme.InternalRenderTheme的用法示例。


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

示例1: getRenderTheme

private XmlRenderTheme getRenderTheme() {
    try {
        return InternalRenderTheme.DEFAULT;
    } catch (Exception e) {
        Analytics.sendException(getContext(), e, false);
    }

    return InternalRenderTheme.OSMARENDER;
}
 
开发者ID:marunjar,项目名称:anewjkuapp,代码行数:9,代码来源:MapFragment.java

示例2: getTilegenerator

private static OsmTilegenerator getTilegenerator(File[] mapsforgeFiles, Integer tileSize, Float scaleFactor) {
	if (tileSize == null || tileSize < 256) {
		tileSize = TILESIZE;
	}
	if (scaleFactor == null)
		scaleFactor = 1.5f;

	MapWorkerPool.NUMBER_OF_THREADS = 4;
	// Map buffer size
	ReadBuffer.setMaximumBufferSize(6500000);
	// Square frame buffer
	FrameBufferController.setUseSquareFrameBuffer(false);

	DisplayModel model = new DisplayModel();
	model.setUserScaleFactor(scaleFactor);
	model.setFixedTileSize(tileSize);

	DataPolicy dataPolicy = DataPolicy.RETURN_ALL;
	MultiMapDataStore mapDatabase = new MultiMapDataStore(dataPolicy);
	for (int i = 0; i < mapsforgeFiles.length; i++)
		mapDatabase.addMapDataStore(new MapFile(mapsforgeFiles[i]), false, false);

	InMemoryTileCache tileCache = new InMemoryTileCache(200);
	DatabaseRenderer renderer = new DatabaseRenderer(mapDatabase, AwtGraphicFactory.INSTANCE, tileCache,
			new TileBasedLabelStore(tileCache.getCapacityFirstLevel()), true, true);
	InternalRenderTheme xmlRenderTheme = InternalRenderTheme.DEFAULT;
	RenderThemeFuture theme = new RenderThemeFuture(AwtGraphicFactory.INSTANCE, xmlRenderTheme, model);
	// super important!! without the following line, all rendering
	// activities will block until the theme is created.
	new Thread(theme).start();

	// TODO get back external themes
	// DatabaseRenderer dbRenderer = null;
	// XmlRenderTheme xmlRenderTheme = null;
	// DisplayModel displayModel = null;
	// if (mapsforgeFile.exists()) {
	// mapDatabase.openFile(mapsforgeFile);
	// dbRenderer = new DatabaseRenderer(mapDatabase, graphicFactory);
	//
	// String mapName =
	// FileUtilities.getNameWithoutExtention(mapsforgeFiles[0]);
	// File xmlStyleFile = new File(mapsforgeFiles[0].getParentFile(),
	// mapName + ".xml");
	// if (xmlStyleFile.exists()) {
	// try {
	// xmlRenderTheme = new ExternalRenderTheme(xmlStyleFile);
	// } catch (Exception e) {
	// xmlRenderTheme = InternalRenderTheme.OSMARENDER;
	// }
	// } else {
	// xmlRenderTheme = InternalRenderTheme.OSMARENDER;
	// }
	// displayModel = new DisplayModel();
	// displayModel.setUserScaleFactor(tileSize / 256f);
	// }

	return new OsmTilegenerator(mapDatabase, renderer, theme, model, tileSize);
}
 
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:58,代码来源:MapsforgeNwwLayer.java


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