Guest User

Untitled

a guest
Oct 14th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var thisEarth = this;
  2. var ajax = new XMLHttpRequest();
  3. ajax.onreadystatechange = function () {
  4.     if (this.readyState == 4) {
  5.  
  6.         var style = '<style type="text/css">';
  7.         style += '#SEA { fill:' + thisEarth.options.mapSeaColor + '; }';
  8.         style += 'path { fill:' + thisEarth.options.mapLandColor + '; ';
  9.         style +=
  10.             'stroke:' +
  11.             (thisEarth.options.mapBorderColor
  12.                 ? thisEarth.options.mapBorderColor
  13.                 : thisEarth.options.mapLandColor) +
  14.             '; ';
  15.         style +=
  16.             'stroke-width:' +
  17.             thisEarth.options.mapBorderWidth +
  18.             '; stroke-miterlimit:1; }';
  19.         style += thisEarth.options.mapStyles;
  20.         style += '</style>';
  21.        
  22.         svg = Earth.fixSvgNamespace(this.responseText).replace(/(<svg[^>]+>)/i, '$1 ' + style);
  23.         thisEarth.mapSvg = svg
  24.  
  25.         thisEarth.loadTexture(!0, !1);
  26.     }
  27. };
  28. ajax.open('GET', this.options.mapImage, !0);
  29. ajax.send();
Add Comment
Please, Sign In to add comment