Add AsyncStringFeatureParser and use plain
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 commit is contained in:
@@ -1,4 +1,5 @@
|
||||
goog.provide('ol.parser.AsyncObjectFeatureParser');
|
||||
goog.provide('ol.parser.AsyncStringFeatureParser');
|
||||
goog.provide('ol.parser.DomFeatureParser');
|
||||
goog.provide('ol.parser.ObjectFeatureParser');
|
||||
goog.provide('ol.parser.ReadFeaturesOptions');
|
||||
@@ -56,6 +57,23 @@ ol.parser.StringFeatureParser.prototype.readFeaturesFromString =
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
ol.parser.AsyncStringFeatureParser = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} data String data.
|
||||
* @param {function(Array.<ol.Feature>)} callback Callback which is called
|
||||
* after parsing.
|
||||
* @param {ol.parser.ReadFeaturesOptions=} opt_options Feature reading options.
|
||||
*/
|
||||
ol.parser.AsyncStringFeatureParser.prototype.readFeaturesFromStringAsync =
|
||||
goog.abstractMethod;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user