Use ol.xml.isDocument in ol.format.XML
This commit is contained in:
@@ -31,8 +31,8 @@ ol.format.XML.prototype.getType = function() {
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.XML.prototype.readFeature = function(source) {
|
ol.format.XML.prototype.readFeature = function(source) {
|
||||||
if (source instanceof Document) {
|
if (ol.xml.isDocument(source)) {
|
||||||
return this.readFeatureFromDocument(source);
|
return this.readFeatureFromDocument(/** @type {Document} */ (source));
|
||||||
} else if (source instanceof Node) {
|
} else if (source instanceof Node) {
|
||||||
return this.readFeatureFromNode(source);
|
return this.readFeatureFromNode(source);
|
||||||
} else if (goog.isString(source)) {
|
} else if (goog.isString(source)) {
|
||||||
@@ -70,8 +70,8 @@ ol.format.XML.prototype.readFeatureFromNode = goog.abstractMethod;
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.XML.prototype.readFeatures = function(source) {
|
ol.format.XML.prototype.readFeatures = function(source) {
|
||||||
if (source instanceof Document) {
|
if (ol.xml.isDocument(source)) {
|
||||||
return this.readFeaturesFromDocument(source);
|
return this.readFeaturesFromDocument(/** @type {Document} */ (source));
|
||||||
} else if (source instanceof Node) {
|
} else if (source instanceof Node) {
|
||||||
return this.readFeaturesFromNode(source);
|
return this.readFeaturesFromNode(source);
|
||||||
} else if (goog.isString(source)) {
|
} else if (goog.isString(source)) {
|
||||||
@@ -114,8 +114,8 @@ ol.format.XML.prototype.readFeaturesFromNode = goog.abstractMethod;
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.XML.prototype.readGeometry = function(source) {
|
ol.format.XML.prototype.readGeometry = function(source) {
|
||||||
if (source instanceof Document) {
|
if (ol.xml.isDocument(source)) {
|
||||||
return this.readGeometryFromDocument(source);
|
return this.readGeometryFromDocument(/** @type {Document} */ (source));
|
||||||
} else if (source instanceof Node) {
|
} else if (source instanceof Node) {
|
||||||
return this.readGeometryFromNode(source);
|
return this.readGeometryFromNode(source);
|
||||||
} else if (goog.isString(source)) {
|
} else if (goog.isString(source)) {
|
||||||
@@ -148,8 +148,8 @@ ol.format.XML.prototype.readGeometryFromNode = goog.abstractMethod;
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.XML.prototype.readProjection = function(source) {
|
ol.format.XML.prototype.readProjection = function(source) {
|
||||||
if (source instanceof Document) {
|
if (ol.xml.isDocument(source)) {
|
||||||
return this.readProjectionFromDocument(source);
|
return this.readProjectionFromDocument(/** @type {Document} */ (source));
|
||||||
} else if (source instanceof Node) {
|
} else if (source instanceof Node) {
|
||||||
return this.readProjectionFromNode(source);
|
return this.readProjectionFromNode(source);
|
||||||
} else if (goog.isString(source)) {
|
} else if (goog.isString(source)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user