尝试在 Osmdroid 中覆盖自定义图块
我有一个 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
并且我的图块未显示。
有人有这方面的经验并且可以提供帮助吗?
I have a Geotiff I want to put on top of a osm base map.
I tiled the Geotiff via maptiler - the output is a folder with the file structure resourcename/zoom/x/y.png
Then I uploaded this filestructure to my webspace and tried to put it in my code like this:
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);
When I start the app and try to add my overlay logcat says this over and over:
SkImageDecoder::Factory returned null
And my tiles are not displayed.
Does anybody have experience with this and can help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论