本文整理汇总了Java中org.mapsforge.map.datastore.MapDataStore类的典型用法代码示例。如果您正苦于以下问题:Java MapDataStore类的具体用法?Java MapDataStore怎么用?Java MapDataStore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MapDataStore类属于org.mapsforge.map.datastore包,在下文中一共展示了MapDataStore类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getInitialPosition
import org.mapsforge.map.datastore.MapDataStore; //导入依赖的package包/类
private MapPosition getInitialPosition() {
File mapFile = getMapFile();
MapDataStore mapDataStore = new MapFile(mapFile);
final LatLong uniteich = new LatLong(48.33706, 14.31960);
final byte zoomLevel = (byte) Math.max(Math.min(DEFAULT_ZOOM_LEVEL /*mapDataStore.startZoomLevel()*/, MAX_ZOOM_LEVEL), MIN_ZOOM_LEVEL);
if (mapDataStore.boundingBox().contains(uniteich)) {
// Insel im Uniteich
return new MapPosition(uniteich, zoomLevel);
} else if (mapDataStore.startPosition() != null &&
mapDataStore.boundingBox().contains(mapDataStore.startPosition())) {
// given start position, zoom in range
return new MapPosition(mapDataStore.startPosition(), zoomLevel);
} else {
// center of the map
return new MapPosition(
mapDataStore.boundingBox().getCenterPoint(),
zoomLevel);
}
}
开发者ID:marunjar,项目名称:anewjkuapp,代码行数:22,代码来源:MapFragment.java
示例2: createTileRendererLayer
import org.mapsforge.map.datastore.MapDataStore; //导入依赖的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;
}
开发者ID:marunjar,项目名称:anewjkuapp,代码行数:12,代码来源:MapFragment.java
示例3: OsmTilegenerator
import org.mapsforge.map.datastore.MapDataStore; //导入依赖的package包/类
public OsmTilegenerator( MapDataStore mapDatabase, final DatabaseRenderer renderer, final RenderThemeFuture renderTheme,
final DisplayModel displayModel, int tileSize ) {
this.mapDatabase = mapDatabase;
this.renderer = renderer;
this.theme = renderTheme;
this.model = displayModel;
this.tileSize = tileSize;
}
开发者ID:TheHortonMachine,项目名称:hortonmachine,代码行数:9,代码来源:OsmTilegenerator.java
示例4: createJob
import org.mapsforge.map.datastore.MapDataStore; //导入依赖的package包/类
private RendererJob createJob(MapDataStore mapData, RenderThemeFuture rtf, byte zoom, int tx, int ty) {
Tile tile = new Tile(tx, ty, zoom, TILE_SIZE);
RendererJob theJob = new RendererJob(tile, mapData, rtf, DISPLAY_MODEL, 1.0f, false, false);
return theJob;
}
开发者ID:virus-warnning,项目名称:mapsforge-web,代码行数:6,代码来源:HttpServerHandler.java
示例5: openMapData
import org.mapsforge.map.datastore.MapDataStore; //导入依赖的package包/类
/**
* 開啟地圖
*
* @param context Activity 或 Service
* @return 圖資存取介面
* @throws IOException
*/
public static MapDataStore openMapData(Context context) throws IOException {
File path = new File(getMapPath(context), MAP_NAME);
return new MapFile(path);
}
开发者ID:OsmHackTW,项目名称:Geomancer,代码行数:12,代码来源:MainUtils.java
注:本文中的org.mapsforge.map.datastore.MapDataStore类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论