Would anyone know a good and easy-to-use library on iOS to parse KML in order to get all the polygons described in the file?
Asked
Active
Viewed 3,678 times
2
-
I've never seen one, but it's certainly not difficult to code one using NSXMLParser or one of the other XML libraries out there. I recommend TouchXML. – pzearfoss Jun 28 '11 at 15:16
-
That's what I finally did because none of the library I found seemed to work ! Personally I used TBXML which quite good and intuitive. Great thanks anyway. – Ben Jul 18 '11 at 15:32
-
@Ben can you please provide me that code snippet. I need to do kml parsing with google map ios sdk. Here is my question http://stackoverflow.com/questions/41262736/how-to-load-kml-file-into-google-maps-ios-sdk – Mitesh Dobareeya Dec 23 '16 at 05:53
3 Answers
1
This appears to be a promising one: https://github.com/mapbox/Simple-KML
Just researching myself.

Bob Spryn
- 17,742
- 12
- 68
- 91
-
Indeed, this seems to be the best one (among the various ones I found). Unfortunately, I didn't managed to make it work properly in my case. Hence, and as explained above, I finally decided to parse the kml myself with the xml parser TBXML... That's personally the solution I would recommend to you. Anyway, thanks for your help ! CU ! – Ben Jul 18 '11 at 15:35
1
You may find the KMLViewer example in the iOS sample code helpful: https://developer.apple.com/library/ios/#samplecode/KMLViewer/Introduction/Intro.html

Michael Reed
- 2,362
- 23
- 15
-1
This one seems to work well for me:
http://kmlframework.com/#license
The sample app lets you enter a URL to some KML, and it will display it.
It is free to use under the MIT license (which includes commercial use).

Dan J
- 25,433
- 17
- 100
- 173