Extending iOS KMLViewer Sample to Handle KML NetworkLink Elements

你离开我真会死。 提交于 2019-12-06 10:57:23

Here's how my investigations went:

  1. I first extended the KMLViewer sample to support the additional elements I needed. The sample is not well suited to this: it is not organized the way a SAX-style parser should be, and the simplistic state machine really needs an overhaul if you want to add more stuff to it.
  2. Next I tried the Simple KML library. It was easy to use, but it took 3500 milliseconds to parse the KML file I needed to parse, which was at least 3000 milliseconds longer than I would find acceptable. Also, Simple KML didn't support all the elements and attributes I needed, so I would have needed to extend it if I wanted to use it.
  3. So, I finally just used TBXML, which was easy to use and which parsed the file in less than 100 milliseconds.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!