尝试使用osmdroid 5.6.5 <。p>显示来自.mbtiles文件的地图时遇到问题
这是我的代码:
val path = Environment.getExternalStorageDirectory().absolutePath.plus("/osmdroid/tiles/map.mbtiles")
val file = File(path)
val tilesSource = XYTileSource(file.absolutePath, 1, 14, 256, "jpg", arrayOf<String>())
val register = SimpleRegisterReceiver(this)
val offProvider = OfflineTileProvider(register, arrayOf(file))
mapView?.apply {
setTileSource(tilesSource)
tileProvider = offProvider
...
}
提前致谢