Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var thisEarth = this;
- var ajax = new XMLHttpRequest();
- ajax.onreadystatechange = function () {
- if (this.readyState == 4) {
- var style = '<style type="text/css">';
- style += '#SEA { fill:' + thisEarth.options.mapSeaColor + '; }';
- style += 'path { fill:' + thisEarth.options.mapLandColor + '; ';
- style +=
- 'stroke:' +
- (thisEarth.options.mapBorderColor
- ? thisEarth.options.mapBorderColor
- : thisEarth.options.mapLandColor) +
- '; ';
- style +=
- 'stroke-width:' +
- thisEarth.options.mapBorderWidth +
- '; stroke-miterlimit:1; }';
- style += thisEarth.options.mapStyles;
- style += '</style>';
- svg = Earth.fixSvgNamespace(this.responseText).replace(/(<svg[^>]+>)/i, '$1 ' + style);
- thisEarth.mapSvg = svg
- thisEarth.loadTexture(!0, !1);
- }
- };
- ajax.open('GET', this.options.mapImage, !0);
- ajax.send();
Add Comment
Please, Sign In to add comment