This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

probable cross-request fix

  • Loading branch information...
Gingernaut committed Mar 29, 2016
1 parent 04c193c commit ff704c15c3a185b2e81e4bdd2a2ccd8c82de8752
Showing with 38 additions and 35 deletions.
  1. +33 −30 Scripts/GSVPano.js
  2. +4 −4 Scripts/app.js
  3. +1 −1 app.css
View
@@ -63,36 +63,39 @@ GSVPANO.PanoLoader = function (parameters) {
};
this.composePanorama = function (panoId) {
this.setProgress(0);
console.log('Loading panorama for zoom ' + _zoom + '...');
var w = (_zoom==3) ? 7 : Math.pow(2, _zoom),
h = Math.pow(2, _zoom - 1),
self = this,
url,
x,
y;
_count = 0;
_total = w * h;
for( y = 0; y < h; y++) {
for( x = 0; x < w; x++) {
url = 'http://maps.google.com/cbk?output=tile&panoid=' + panoId + '&zoom=' + _zoom + '&x=' + x + '&y=' + y + '&' + Date.now();
(function (x, y) {
var img = new Image();
img.addEventListener('load', function () {
self.composeFromTile(x, y, this);
});
img.crossOrigin = '';
img.src = url;
})(x, y);
}
}
};
this.composePanorama = function (panoId) {
this.setProgress(0);
console.log('Loading panorama for zoom ' + _zoom + '...');
var w = (_zoom==3) ? 7 : Math.pow(2, _zoom),
h = Math.pow(2, _zoom - 1),
self = this,
url,
x,
y;
_count = 0;
_total = w * h;
for( y = 0; y < h; y++) {
for( x = 0; x < w; x++) {
url = 'https://maps.google.com/cbk?output=tile&panoid=' + panoId + '&zoom=' + _zoom + '&x=' + x + '&y=' + y + '&' + Date.now();
(function (x, y) {
var img = new Image();
img.addEventListener('load', function () {
self.composeFromTile(x, y, this);
});
img.addEventListener('error', function () {
self.composeFromTile(x, y, new Image());
});
img.crossOrigin = 'anonymous';
img.src = url;
})(x, y);
}
}
};
this.load = function (location, callback) {
View
@@ -7,13 +7,13 @@ $('.close-button').click(function(e) {
});
$('#Generate').click(function() {
$('#scrim').css("display", "block");
$('#mapmodal').css("display", "block");
$('#scrim').css("display", "inline-block");
$('#mapmodal').css("display", "inline-block");
});
$('.svg-wrapper').click(function(e) {
e.preventDefault();
$('#scrim').css("display", "block");
$('#aboutme').css("display","block");
$('#scrim').css("display", "inline-block");
$('#aboutme').css("display","inline-block");
});
View
@@ -164,7 +164,7 @@ input[type="radio"] {
z-index: 1000;
position: absolute;
top: 50%;
height: 400px;
height: 350px;
transform: translateY(-50%);
width: 100%;
text-align: center;

0 comments on commit ff704c1

Please sign in to comment.