How to display my own map in MKMapView?

扶醉桌前 提交于 2019-12-31 03:08:07

问题


i have a small map of a town, i want to place it into the google map, any idea how to do it ? i am doing so because i need google map to point out user current location.


回答1:


Checkout the TileMap example code from Apple




回答2:


To display a custom map in MKMapView your custom map needs to be in Keyhole Markup Language (KML). KML is a file format used to display geographic data in an Earth browser such as Google Earth, Google Maps, and Google Maps for mobile. The file can include custom images and annotations.

  • KML Documentation Introduction
  • Google Earth
  • KML Tutorial I would follow this tutorial before working on your app. It will give you a better overview of what is possible.
  • iOS sample code KMLViewer

http://developer.apple.com/library/ios/#samplecode/KMLViewer/Introduction/Intro.html



来源:https://stackoverflow.com/questions/5691925/how-to-display-my-own-map-in-mkmapview

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