iOS how can I make MapKit display custom indoor map?

时间秒杀一切 提交于 2019-12-07 10:33:02

问题


I'm trying to create a map of the office I'm working at. I have a high resolution image, and would like to autorotate it in the direction the user is heading, allowing the user to navigate around the map. I thought this could be accomplished using CoreMotion/CoreLocation and a UIScrollView, but this seems like there's some work involved.

So I'm wondering if there are easier solutions for combining a custom map and direction/position on that map - can MapKit handle this for me? Are there other frameworks that can help me show a local 2D map with compass orientation on it?


回答1:


You can convert your high-res image into map tiles easily with TileMill.




回答2:


You should use some custom tiles with MKTileOverlay which only display at a very high zoom level (like z 18 or whatever). I suggest you take a look over at NSHipster and read what they have about it:

http://nshipster.com/mktileoverlay-mkmapsnapshotter-mkdirections/

*Disclaimer: I haven't tried this myself, came across the NSHipster article while searching for solutions to my own problems.



来源:https://stackoverflow.com/questions/24071154/ios-how-can-i-make-mapkit-display-custom-indoor-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!