KMLViewer iOS Extension for KML NetworkLink Elements Processing

I am developing an iOS application that displays KML data by MKMapView.

Apple KMLViewer sample application started me. Unfortunately, the KML data I use is heavily dependent on linked files through the NetworkLink , Link and href KML elements, and the KMLViewer parser does not process them.

Maybe I can figure out how to add such support, but before I go down this road, I was wondering if anyone else had done this, or if there is a better starting point than KMLViewer.

I looked at Simple KML , but it does not seem to support NetworkLink .

+2
ios mapkit kml
source share
1 answer

Here's how my research went:

  • I first extended the KMLViewer sample to support the additional elements that I need. The sample is not very suitable for this: it is not organized in the way the SAX-style parser should look like, and the simplified state machine really needs a major overhaul if you want to add more things to it.
  • Next I tried the Simple KML library. It was easy to use, but it took 3,500 milliseconds to parse the KML file that I needed for analysis, which was at least 3,000 milliseconds longer than what I thought was acceptable. In addition, Simple KML did not support all the elements and attributes that I needed, so I would need to extend it if I wanted to use it.
  • So, I finally just used TBXML , which was easy to use and that parsed the file in less than 100 milliseconds.
+3
source share

All Articles