1

我有一个 Geotiff,我想把它放在 osm 底图上。我通过 maptiler 平铺了 Geotiff - 输出是具有文件结构的文件夹resourcename/zoom/x/y.png

然后我将此文件结构上传到我的网站空间并尝试将其放入我的代码中,如下所示:

final MapTileProviderBasic tileProvider = new MapTileProviderBasic(
    getApplicationContext());
final ITileSource tileSource = new XYTileSource(
    "myGeotiff", null, 14, 16, 256, ".png", "http://mysite.com/");
tileProvider.setTileSource(tileSource);
final TilesOverlay tilesOverlay = new TilesOverlay(
    tileProvider, this.getBaseContext());
tilesOverlay.setLoadingBackgroundColor(Color.TRANSPARENT);
osmv.getOverlays().add(tilesOverlay);

当我启动应用程序并尝试添加我的叠加层时,logcat 一遍又一遍地说:

SkImageDecoder::Factory returned null

而且我的瓷砖没有显示。

有没有人有这方面的经验并且可以提供帮助?

4

0 回答 0