From 2bef2e882fe53a655afb70aec5a45084d82649e5 Mon Sep 17 00:00:00 2001 From: gwills Date: Sat, 7 Sep 2013 17:08:39 +0100 Subject: [PATCH] IE 10 not reading DZI file correctly IE 10 is treating the data coming back from the JSONP request as a string and not as XML. I have confirmed this issue is happening on numerous IE10 machines but have not seen it on any other browser. The change simply checks the type of the data variable and if it is a string it parses the string as XML and updates the data object. --- src/tilesource.js | 4 ++++ 1 file changed, 4 insertions(+) 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 } );