How to display my own map in MKMapView?

后端 未结 2 1270
萌比男神i
萌比男神i 2021-01-22 14:26

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.

2条回答
  •  -上瘾入骨i
    2021-01-22 14:52

    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

提交回复
热议问题