Android的 - 离线,基于非矢量,自定义地图离线、自定义、矢量、地图

2023-09-05 03:15:50 作者:为谁画相思╮

有关我工作的一个应用程序,我需要显示自定义的光栅图像砖(不基于矢量的,大概是从卫星图像),我需要这样做下线。我想用的MapView,但我不能看到从谷歌的服务器上拉低数据的方式来告诉它使用习惯,离线地图图块来代替。

For an application I am working on, I need to display custom raster image tiles (not vector based, probably from satellite imagery), and I need to do so offline. I would like to use the MapView, but I cannot see a way to tell it to use custom, offline map tiles instead of pulling down data from google's servers.

我已经看到了一些替代品,但没有似乎适合我的需要。

I've seen a few alternatives, but none seem appropriate to my need

MapDroyd似乎只支持基于矢量的地图。 mapdroyd.com /

MapDroyd Seems to only support vector-based maps. mapdroyd.com/

OSMDroid似乎使用开放街道地图;我没有看到任何文件,任何地方,说明您可以使用自定义地图图块。 code.google.com / P / osmdroid /

OSMDroid Appears to use Open Street Maps; I don't see any documentation anywhere stating that you can use custom map tiles. code.google.com/p/osmdroid/

有第三种选择,但我的帖子得到了吃掉,我无法找到它在我的历史。

There was a third alternative, but my post got eaten and I can't find it in my history.

难道我将不得不硬着头皮推出自己的?

Am I going to have to bite the bullet and 'roll my own'?

推荐答案

我们最终会与开放街道地图和自定义源,以满足我们的需求。遗憾的是不能轻易切换瓷砖的来源,所以我们坚持与基于矢量的。最后写一些code,以确保缓存切片坚持在应用程序关闭,这样我们就可以访问它们没有连接。

We ended up going with Open Street Maps and customizing source to meet our needs. Unfortunately couldn't easily switch the source of tiles, so we were stuck with the vector based ones. Ended up writing some code to ensure that cached tiles persist on app shut down, so we could access them without connection.