use of org.oscim.layers.tile.vector.labeling.LabelLayer in project graphhopper by graphhopper.
the class MainActivity method loadMap.
void loadMap(File areaFolder) {
logUser("loading map");
// Map events receiver
mapView.map().layers().add(new MapEventsReceiver(mapView.map()));
// Map file source
MapFileTileSource tileSource = new MapFileTileSource();
tileSource.setMapFile(new File(areaFolder, currentArea + ".map").getAbsolutePath());
VectorTileLayer l = mapView.map().setBaseMap(tileSource);
mapView.map().setTheme(VtmThemes.DEFAULT);
mapView.map().layers().add(new BuildingLayer(mapView.map(), l));
mapView.map().layers().add(new LabelLayer(mapView.map(), l));
// Markers layer
itemizedLayer = new ItemizedLayer<>(mapView.map(), (MarkerSymbol) null);
mapView.map().layers().add(itemizedLayer);
// Map position
GeoPoint mapCenter = tileSource.getMapInfo().boundingBox.getCenterPoint();
mapView.map().setMapPosition(mapCenter.getLatitude(), mapCenter.getLongitude(), 1 << 15);
setContentView(mapView);
loadGraphStorage();
}
Aggregations