This makes the asynchronous and synchronous versions of
readFeatures work with the same data structures, and leaves
projection handling outside the parsers.
XMLHttpRequest in the KML example
Since the content-type on github.io is application/octet-stream we need
to implement an Async string based parser interface in the KML parser.
Also use plain XmlHttpRequest in the example instead of jQuery Ajax since
the vector-features example also uses that.
This adds ol.parser.ogc.KML which can be used to read and write KML documents.
NetworkLinks are retrieved asynchronously.
Current caveats of the implementation are:
* LabelStyle not yet implemented. Missing support in renderers.
* When using shared structures the parser needs to be configured with
dimension 2.
* We need a better way to disable fill, currently we use opacity as a
workaround.
* We cannot really roundtrip documents, since some of the info is not
preserved in the ol structures. But we can write out most of the important
info.
Parsers that read features from strings, objects, or dom elements should implement the right interface. Among the read options is a callback that gets called after feature construction and before geometry construction. This callback is called with the feature and the geometry type and returns a shared vertices structure. The geometry is then constructed with this shared vertices structure before being added to the feature.