Answer the question
In order to leave comments, you need to log in
Why doesn't mapsforge render tiles?
> the tiles themselves are rendered, a cache is created on the memory card, a gray layer is visible on the MapView itself on a white background and you can see > that this is a map, it is loaded in squares, but the tiles themselves are not shown, I also see the zoom and the ruler
looked at the tiles themselves - like files they are generated but not rendered, all the same size with a gray fill,
i.e. MapView all shows
the maps themselves correctly from here ftp-stud.hs-esslingen.de/pub/Mirrors/download.maps...
tried v3 and v5 (by the way - what's the difference?)
implementation 'org.mapsforge:mapsforge-core:0.11.0'
implementation 'org.mapsforge:mapsforge-map:0.11.0'
implementation 'org.mapsforge:mapsforge-map-reader:0.11.0'
implementation 'org.mapsforge:mapsforge-themes:0.11.0'
implementation 'net.sf.kxml:kxml2:2.3.0'
implementation 'org.mapsforge:mapsforge-map-android:0.11.0'
implementation 'com.caverock:androidsvg:1.3'
AndroidGraphicFactory.createInstance(this); //Appplication.onCreate
private fun createMapViews(root: View) {
mapView = root.findViewById(R.id.mapView)
mapView.model.init(preferencesFacade)
mapView.isClickable = true
mapView.mapScaleBar.isVisible = true
mapView.setBuiltInZoomControls(true)
mapView.mapZoomControls.isAutoHide = true
mapView.mapZoomControls.zoomLevelMin = 0
mapView.mapZoomControls.zoomLevelMax = 15
}
...
private fun createLayers() {
val tileCache = AndroidUtil.createTileCache(
activity, TILES_FOLDER,
mapView.model.displayModel.tileSize,
1.0f,
1.5
)
mapView.layerManager.layers.add(
AndroidUtil.createTileRendererLayer(
tileCache,
mapView.model.mapViewPosition,
getMapFile(),
getRenderTheme()
)
)
//this.mapView.setCenter(this.dummyItem.location);
this.mapView.setZoomLevel(16)
}
private fun getRenderTheme(): XmlRenderTheme {
return InternalRenderTheme.OSMARENDER
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question