本文整理汇总了Java中org.mapsforge.map.layer.LayerManager类的典型用法代码示例。如果您正苦于以下问题:Java LayerManager类的具体用法?Java LayerManager怎么用?Java LayerManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LayerManager类属于org.mapsforge.map.layer包,在下文中一共展示了LayerManager类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MapView
import org.mapsforge.map.layer.LayerManager; //导入依赖的package包/类
public MapView() {
super();
this.model = new Model();
this.fpsCounter = new FpsCounter(GRAPHIC_FACTORY,
this.model.displayModel);
this.frameBuffer = new FrameBuffer(this.model.frameBufferModel,
this.model.displayModel, GRAPHIC_FACTORY);
this.frameBufferController = FrameBufferController.create(
this.frameBuffer, this.model);
this.layerManager = new LayerManager(this, this.model.mapViewPosition,
GRAPHIC_FACTORY);
this.layerManager.start();
LayerManagerController.create(this.layerManager, this.model);
MapViewController.create(this, this.model);
this.mapScaleBar = new DefaultMapScaleBar(this.model.mapViewPosition,
this.model.mapViewDimension, GRAPHIC_FACTORY,
this.model.displayModel);
}
示例2: onCreateView
import org.mapsforge.map.layer.LayerManager; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_item_detail,
container, false);
if (this.dummyItem != null) {
this.mapView = (MapView) rootView.findViewById(R.id.mapView);
this.mapView.setClickable(true);
this.mapView.getFpsCounter().setVisible(true);
this.mapView.getMapScaleBar().setVisible(true);
LayerManager layerManager = this.mapView.getLayerManager();
Layers layers = layerManager.getLayers();
MapViewPosition mapViewPosition = this.mapView.getModel().mapViewPosition;
mapViewPosition.setZoomLevel((byte) 16);
this.tileCache = AndroidUtil.createTileCache(this.getActivity(),
"fragments",
this.mapView.getModel().displayModel.getTileSize(), 1.0f,
1.5);
mapViewPosition.setCenter(this.dummyItem.location);
layers.add(AndroidUtil.createTileRendererLayer(this.tileCache,
mapViewPosition, getMapFile(),
InternalRenderTheme.OSMARENDER, false, true));
}
return rootView;
}
示例3: addLayers
import org.mapsforge.map.layer.LayerManager; //导入依赖的package包/类
private static void addLayers(MapView mapView, String MapPath) {
LayerManager layerManager = mapView.getLayerManager();
Layers layers = layerManager.getLayers();
TileCache tileCache = createTileCache();
layers.clear();
layers.add(createTileRendererLayer(tileCache, mapView.getModel().mapViewPosition, layerManager, MapPath));
}
示例4: destroyLayers
import org.mapsforge.map.layer.LayerManager; //导入依赖的package包/类
protected void destroyLayers() {
for (LayerManager layerManager : this.layerManagers) {
for (Layer layer : layerManager.getLayers()) {
layerManager.getLayers().remove(layer);
layer.onDestroy();
Log.i("DESTROY", "Destroyed: " + layer.toString());
}
}
}
示例5: createTileRendererLayer
import org.mapsforge.map.layer.LayerManager; //导入依赖的package包/类
private static Layer createTileRendererLayer(TileCache tileCache, MapViewPosition mapViewPosition, LayerManager layerManager, String MapPath) {
java.io.File mapFile = new java.io.File(MapPath);
TileRendererLayer tileRendererLayer = new TileRendererLayer(tileCache, new MapFile(mapFile), mapViewPosition, false, false, true, GRAPHIC_FACTORY);
tileRendererLayer.setXmlRenderTheme(InternalRenderTheme.OSMARENDER);
return tileRendererLayer;
}
示例6: getLayerManager
import org.mapsforge.map.layer.LayerManager; //导入依赖的package包/类
@Override
public LayerManager getLayerManager() {
return this.layerManager;
}
示例7: redrawLayers
import org.mapsforge.map.layer.LayerManager; //导入依赖的package包/类
protected void redrawLayers() {
for (LayerManager layerManager : this.layerManagers) {
layerManager.redrawLayers();
}
}