Use ol.xml.isNode in ol.format.KML

This commit is contained in:
Tom Payne
2014-02-04 15:43:39 +01:00
parent f22495871c
commit cd1355a699
+2 -2
View File
@@ -1577,8 +1577,8 @@ ol.format.KML.prototype.readFeaturesFromNode = function(node) {
ol.format.KML.prototype.readName = function(source) { ol.format.KML.prototype.readName = function(source) {
if (ol.xml.isDocument(source)) { if (ol.xml.isDocument(source)) {
return this.readNameFromDocument(/** @type {Document} */ (source)); return this.readNameFromDocument(/** @type {Document} */ (source));
} else if (source instanceof Node) { } else if (ol.xml.isNode(source)) {
return this.readNameFromNode(source); return this.readNameFromNode(/** @type {Node} */ (source));
} else if (goog.isString(source)) { } else if (goog.isString(source)) {
var doc = ol.xml.load(source); var doc = ol.xml.load(source);
return this.readNameFromDocument(doc); return this.readNameFromDocument(doc);