本文整理汇总了Java中org.mapsforge.map.android.util.AndroidUtil.createTileRendererLayer方法的典型用法代码示例。如果您正苦于以下问题:Java AndroidUtil.createTileRendererLayer方法的具体用法?Java AndroidUtil.createTileRendererLayer怎么用?Java AndroidUtil.createTileRendererLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mapsforge.map.android.util.AndroidUtil
的用法示例。
在下文中一共展示了AndroidUtil.createTileRendererLayer方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: changeRenderTheme
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
void changeRenderTheme() {
File[] renderThemes = new File("/storage/sdcard1").listFiles(renderThemesFilter);
if (renderThemes.length > 0) {
File nextTheme = renderThemes[iteration % renderThemes.length];
iteration += 1;
try {
XmlRenderTheme nextRenderTheme = new ExternalRenderThemeUsingJarResources(nextTheme);
Log.i(SamplesApplication.TAG, "Loading new render theme " + nextTheme.getName());
// there should really be a simpler way to just change the
// render theme safely
mapView.getLayerManager().getLayers().remove(tileRendererLayer);
tileRendererLayer.onDestroy();
tileCaches.get(0).destroy();
tileRendererLayer = AndroidUtil.createTileRendererLayer(tileCaches.get(0),
mapView.getModel().mapViewPosition, getMapFile(), nextRenderTheme,
false, false);
mapView.getLayerManager().getLayers().add(tileRendererLayer);
mapView.getLayerManager().redrawLayers();
} catch (FileNotFoundException e) {
Log.i(SamplesApplication.TAG, "Could not open file " + nextTheme.getName());
}
}
}
示例2: createTileRendererLayer
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
private TileRendererLayer createTileRendererLayer(TileCache tileCache,
MapViewPosition mapViewPosition, File mapFile,
XmlRenderTheme renderTheme) {
MapDataStore mapDataStore = new MapFile(mapFile);
TileRendererLayer tileRendererLayer = AndroidUtil.createTileRendererLayer(tileCache,
mapViewPosition, mapDataStore, renderTheme, false, false, true);
tileRendererLayer.setTextScale(1.5f);
return tileRendererLayer;
}
示例3: createLayers
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
@Override
protected void createLayers() {
tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
this.mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(),
false, true);
mapView.getLayerManager().getLayers().add(tileRendererLayer);
this.changerThread = new ChangerThread();
this.changerThread.start();
}
示例4: createLayers
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
@Override
protected void createLayers() {
TileRendererLayer tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(), false, true);
this.mapView.getLayerManager().getLayers().add(tileRendererLayer);
// needed only for samples to hook into Settings.
setMaxTextWidthFactor();
}
示例5: createLayers
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
@Override
protected void createLayers() {
TileRendererLayer tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(), false, true);
this.mapView.getLayerManager().getLayers().add(tileRendererLayer);
TileRendererLayer tileRendererLayer2 = AndroidUtil.createTileRendererLayer(this.tileCaches.get(1),
mapView.getModel().mapViewPosition, getMapFile2(), getRenderTheme(), true, true);
this.mapView.getLayerManager().getLayers().add(tileRendererLayer2);
// needed only for samples to hook into Settings.
setMaxTextWidthFactor();
}
示例6: createLayers
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
protected void createLayers() {
TileRendererLayer tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
this.mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(), false, false);
mapView.getLayerManager().getLayers().add(tileRendererLayer);
org.mapsforge.map.layer.labels.LabelLayer labelLayer = new org.mapsforge.map.layer.labels.LabelLayer(AndroidGraphicFactory.INSTANCE, tileRendererLayer.getLabelStore());
mapView.getLayerManager().getLayers().add(labelLayer);
}
示例7: createLayers
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
@Override
protected void createLayers() {
tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
this.mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(),
false, true);
this.mapView.getLayerManager().getLayers().add(tileRendererLayer);
}
示例8: createLayers
import org.mapsforge.map.android.util.AndroidUtil; //导入方法依赖的package包/类
/**
* Creates a simple tile renderer layer with the AndroidUtil helper.
*/
protected void createLayers() {
TileRendererLayer tileRendererLayer = AndroidUtil.createTileRendererLayer(this.tileCaches.get(0),
this.mapView.getModel().mapViewPosition, getMapFile(), getRenderTheme(), false, true);
this.mapView.getLayerManager().getLayers().add(tileRendererLayer);
}