This reverts 4d619d71b1 (see #1527), going back to what we had after e13075f6ff (see #881).
To avoid the 404 in the hosted examples, the css is copied to the same relative path when hosted as during development.
This commit also removes the click listener, which was used for touch devices. The click listener will be added back when the lib will correctly handle clicks on touch devices.
With this change, hit detection for lines and points gets very
accurate, because the vector renderer instance keeps track of
line widths and point symbol sizes. After doing a bbox query in
the RTree, returned lines and points are evaluated against the
thresholds of their line width or symbol size. The KML example
with its different symbolizers now has getFeatureInfo too to
show this in action.
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.