MAPG-203 adapt game.js to the new endpoints
All checks were successful
default-pipeline default-pipeline #15
All checks were successful
default-pipeline default-pipeline #15
This commit is contained in:
parent
9c4b7448a9
commit
c317a0abf4
@ -26,7 +26,7 @@
|
||||
});
|
||||
Game.map.fitBounds(mapBounds);
|
||||
|
||||
MapGuesser.httpRequest('GET', '/game/' + mapId + '/newPlace.json', function () {
|
||||
MapGuesser.httpRequest('GET', '/game/' + mapId + '/initialData.json', function () {
|
||||
document.getElementById('loading').style.visibility = 'hidden';
|
||||
document.getElementById('panoCover').style.visibility = 'hidden';
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
Game.panoId = this.response.panoId;
|
||||
Game.pov = this.response.pov;
|
||||
Game.panoId = this.response.place.panoId;
|
||||
Game.pov = this.response.place.pov;
|
||||
|
||||
if (this.response.history) {
|
||||
for (var i = 0; i < this.response.history.length; ++i) {
|
||||
@ -200,8 +200,13 @@
|
||||
document.getElementById('showSummaryButton').style.display = 'block';
|
||||
}
|
||||
|
||||
Game.panoId = this.response.panoId;
|
||||
Game.pov = this.response.pov;
|
||||
if (this.response.newPlace) {
|
||||
Game.panoId = this.response.newPlace.panoId;
|
||||
Game.pov = this.response.newPlace.pov;
|
||||
} else {
|
||||
Game.panoId = null;
|
||||
Game.pov = null;
|
||||
}
|
||||
}, data);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user