diff --git a/src/tilesource.js b/src/tilesource.js index fce3cbb3..9055047b 100644 --- a/src/tilesource.js +++ b/src/tilesource.js @@ -299,6 +299,10 @@ $.TileSource.prototype = { } callback = function( data ){ + if( typeof(data) === "string" ) { + var tmp = new DOMParser(); + data = tmp.parseFromString( data , "text/xml" ); + } var $TileSource = $.TileSource.determineType( _this, data, url ); if ( !$TileSource ) { _this.raiseEvent( 'open-failed', { message: "Unable to load TileSource", source: url } );