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.
The new dedicated getfeatureinfo example shows how to combine
feature info from a WMS and a vector layer. The other examples
that previously used getFeatureInfo from vector layers now use
the more appropriate getFeatures.
To avoid surprises for application developers, this change
creates a new getFeatures method. So it is clear now beforehand
whether features or feature info markup is returned. The result
is now also grouped by layer, so application developers always
have a link between a layer and the feature info it returns.
To make getFeatureInfo return markup for vector layers, this
change also adds a featureInfoFunction property to the vector
layer, which gives developers full control over how features are
rendered to feature info markup.
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.