Skip to content

Commit

Permalink
Merge pull request shramov#7 from Henner/master
Browse files Browse the repository at this point in the history
IE fixes
  • Loading branch information
shramov committed May 24, 2012
2 parents b817c7a + 8497c8b commit cb2bacf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion control/Scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ L.Control.Scale = L.Control.extend({
options: {
position: "bottomleft",
useCanvas: null,
width: 100,
width: 100
},

initialize: function(options) {
Expand Down
4 changes: 3 additions & 1 deletion layer/vector/GPX.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ L.GPX = L.FeatureGroup.extend({

var req = new window.XMLHttpRequest();
req.open('GET', url, async);
req.overrideMimeType('text/xml');
try {
req.overrideMimeType('text/xml'); // unsupported by IE
} catch(e) {}
req.onreadystatechange = function() {
if (req.readyState != 4) return;
if(req.status == 200) cb(req.responseXML, options);
Expand Down
4 changes: 3 additions & 1 deletion layer/vector/KML.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ L.KML = L.FeatureGroup.extend({

var req = new window.XMLHttpRequest();
req.open('GET', url, async);
req.overrideMimeType('text/xml');
try {
req.overrideMimeType('text/xml'); // unsupported by IE
} catch(e) {}
req.onreadystatechange = function() {
if (req.readyState != 4) return;
if(req.status == 200) cb(req.responseXML, options);
Expand Down

0 comments on commit cb2bacf

Please sign in to comment.