How to use Offline Cloudmade Maps in an iPhone App

2020-02-11 06:33发布

I’ve looked through the posts on the Cloudmade site here and I get some of it, but not all. I've posted the question below, but haven't had the help I need, so I thought I'd ask the question here.

I can see that I need to:

  • download the tiles for the required area to my Mac (but can’t see how to do this)
  • convert these to a sqlite database using the map2sqlite utility, changing the code to output the tiles to a table called “ZCACHE”, not “tiles”
  • Copy the DB to the Application Bundle
  • insert some code to copy this DB on first run, from the Application Bundle to the Documents Directory
  • Somehow get App to use this DB and not an online one – I can’t see how that’s done.

Any help would be warmly welcomed,

Chris.

2条回答
Viruses.
2楼-- · 2020-02-11 06:48

The best solution for me to have iPhone offline maps is:

1.- Generate your own maps with TileMill and then export to MBTiles format.

2.- Get the mbtiles-ios-example and use the MBTiles file you just generated. In order to compile it, you need to download Route-Me and add it to the project.

Now, there is another option (not for free): Mapbox.

查看更多
甜甜的少女心
3楼-- · 2020-02-11 06:55

please check this tutorial, it can help - http://www.gisnotes.com/wordpress/category/sqlite3/.

查看更多
登录 后发表回答