Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Efficient KML Rendering as a MapKit overlay on the iPhone

Howdy all. I'm working on a project that will (ideally) require the rendering of large, complex KML files as an overlay/overlays on a MapKit MKMapView.

I've tried the KML parser that Apple's sample documentation provides, and it's rather incapable of performing as needed. Now, I'm wondering if anyone knows of another available solution.

like image 505
Jordaan Mylonas Avatar asked Mar 31 '11 04:03

Jordaan Mylonas


1 Answers

If you are referring to Apple's KMLViewer, it is using NSXMLParser, which is the slowest method. enter image description here

I'm not sure how fast you need, if TouchXML's performance is good enough for you, you should take a look at Simple-KML. If that's not fast enough, I think you should implement your own parser based on TBXML, but without validation + XPath support. (Let's assume Google's data is always rite ;-)

Edit: Another user find Simple-KML is not fast enough and use TBXML directly also

Extending iOS KMLViewer Sample to Handle KML NetworkLink Elements

like image 92
vk.edward.li Avatar answered Oct 04 '22 23:10

vk.edward.li