OSM在Android上离线 [英] OSM offline on Android

查看:205
本文介绍了OSM在Android上离线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在android上构建离线地图,但我仍然是其中的初学者.因此我在项目中添加了osmdroid,并从此链接下载了地图数据.在互联网上进行搜索后,我仍然没有找到显示数据的示例.另外osmdroid使用我发现的SD卡位置.是否有可能通过一个清晰的示例来更改它?

I'm trying to build an offline map on android and I'm still a beginner in that. so I added osmdroid to my project and I downloaded a the map data from this link. after some searching in the internet I still didn't find an example to display the data. In addition osmdroid use sd card location from what I found. is there a possibility to change that with a clear example about how to do it ?

谢谢

推荐答案

您下载了原始的openstreetmap数据. Osmdroid需要渲染的图块才能使用离线功能.

You downloaded raw openstreetmap data. Osmdroid requires rendered tiles for offline functionality.

所以您有两个问题:

1)如何获取渲染图块. 2)如何将它们集成到应用程序中以供离线使用.

1) How to get rendered tiles. 2) How to integrate them into the application for offline usage.

Osmdroid拥有关于脱机地图的相当不错的文档,并且这是一个非常复杂的主题,无法在一个适当的Stackoverflow答案中涵盖.您需要阅读 osmdroid Wiki文章Offline-Map-Tiles 涵盖了您的所有问题(甚至是有关文件位置的问题).

Osmdroid has quite good documentation about offline maps and it is quite complex topic which cannot be covered in one proper Stackoverflow answer. You'll need to go through osmdroid wiki article Offline-Map-Tiles where are covered both your problems (and even your question about file location).

您还应检查其他Wiki主题.

There are other wiki topics you schuld check.

  • https://github.com/osmdroid/osmdroid/wiki/Map-Sources
  • https://github.com/osmdroid/osmdroid/wiki/Modular-Tile-Provider-Architecture

这篇关于OSM在Android上离线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆