简体   繁体   English

iOS如何让MapKit显示自定义室内地图?

[英]iOS how can I make MapKit display custom indoor map?

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. 我认为这可以使用CoreMotion / CoreLocation和UIScrollView来完成,但这似乎涉及到一些工作。

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? 所以我想知道是否有更简单的解决方案在地图上组合自定义地图和方向/位置 - MapKit可以为我处理这个吗? Are there other frameworks that can help me show a local 2D map with compass orientation on it? 是否有其他框架可以帮助我显示带有指南针方向的本地2D地图?

您可以使用TileMill轻松地将高分辨率图像转换为地图图块。

You should use some custom tiles with MKTileOverlay which only display at a very high zoom level (like z 18 or whatever). 你应该使用MKTileOverlay的一些自定义图块,它只能以非常高的缩放级别显示(如z 18或其他)。 I suggest you take a look over at NSHipster and read what they have about it: 我建议你看看NSHipster并阅读他们的相关内容:

http://nshipster.com/mktileoverlay-mkmapsnapshotter-mkdirections/ 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. *免责声明:我自己没有尝试过,在寻找解决我自己问题的方法时遇到了NSHipster的文章。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM