MAPG-20 rename guessMap to map
This commit is contained in:
parent
96ee250f96
commit
f110bb9b18
@ -101,12 +101,12 @@ div.buttonContainer.bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#guessMap {
|
||||
#map {
|
||||
width: 100%;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#guess.result > #guessMap {
|
||||
#guess.result > #map {
|
||||
height: 70%;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
@ -182,7 +182,7 @@ div.buttonContainer.bottom {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#guessMap {
|
||||
#map {
|
||||
height: calc(100% - 90px);
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ div.buttonContainer.bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#guessMap {
|
||||
#map {
|
||||
height: calc(100% - 45px);
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
scoreSum: 0,
|
||||
realPosition: null,
|
||||
panorama: null,
|
||||
guessMap: null,
|
||||
map: null,
|
||||
guessMarker: null,
|
||||
adaptGuess: false,
|
||||
googleLink: null,
|
||||
@ -77,10 +77,10 @@
|
||||
document.getElementById('guess').style.visibility = null;
|
||||
document.getElementById('guess').classList.remove('result')
|
||||
|
||||
Core.guessMap.setOptions({
|
||||
Core.map.setOptions({
|
||||
draggableCursor: 'crosshair'
|
||||
});
|
||||
Core.guessMap.fitBounds(guessMapBounds);
|
||||
Core.map.fitBounds(guessMapBounds);
|
||||
|
||||
Core.startNewRound();
|
||||
},
|
||||
@ -157,10 +157,10 @@
|
||||
resultBounds.extend(Core.realPosition);
|
||||
resultBounds.extend(guessPosition);
|
||||
|
||||
Core.guessMap.setOptions({
|
||||
Core.map.setOptions({
|
||||
draggableCursor: 'grab'
|
||||
});
|
||||
Core.guessMap.fitBounds(resultBounds);
|
||||
Core.map.fitBounds(resultBounds);
|
||||
|
||||
document.getElementById('distance').innerHTML = Util.printDistanceForHuman(distance);
|
||||
document.getElementById('score').innerHTML = score;
|
||||
@ -180,7 +180,7 @@
|
||||
var round = Core.rounds[Core.rounds.length - 1];
|
||||
|
||||
round.realMarker = new google.maps.Marker({
|
||||
map: Core.guessMap,
|
||||
map: Core.map,
|
||||
visible: !hidden,
|
||||
position: realPosition,
|
||||
clickable: true,
|
||||
@ -192,7 +192,7 @@
|
||||
});
|
||||
|
||||
round.guessMarker = new google.maps.Marker({
|
||||
map: Core.guessMap,
|
||||
map: Core.map,
|
||||
visible: !hidden,
|
||||
position: guessPosition,
|
||||
clickable: false,
|
||||
@ -207,7 +207,7 @@
|
||||
});
|
||||
|
||||
round.line = new google.maps.Polyline({
|
||||
map: Core.guessMap,
|
||||
map: Core.map,
|
||||
visible: !hidden,
|
||||
path: [
|
||||
realPosition,
|
||||
@ -275,7 +275,7 @@
|
||||
resultBounds.extend(round.guessPosition);
|
||||
}
|
||||
|
||||
Core.guessMap.fitBounds(resultBounds);
|
||||
Core.map.fitBounds(resultBounds);
|
||||
|
||||
document.getElementById('scoreSum').innerHTML = Core.scoreSum;
|
||||
|
||||
@ -363,16 +363,16 @@
|
||||
Core.adaptGuess = true;
|
||||
}
|
||||
|
||||
Core.guessMap = new google.maps.Map(document.getElementById('guessMap'), {
|
||||
Core.map = new google.maps.Map(document.getElementById('map'), {
|
||||
disableDefaultUI: true,
|
||||
clickableIcons: false,
|
||||
draggableCursor: 'crosshair',
|
||||
draggingCursor: 'grabbing'
|
||||
});
|
||||
|
||||
Core.guessMap.fitBounds(guessMapBounds);
|
||||
Core.map.fitBounds(guessMapBounds);
|
||||
|
||||
Core.guessMap.addListener('click', function (e) {
|
||||
Core.map.addListener('click', function (e) {
|
||||
if (Core.rounds[Core.rounds.length - 1].guessPosition) {
|
||||
return;
|
||||
}
|
||||
@ -383,7 +383,7 @@
|
||||
}
|
||||
|
||||
Core.guessMarker = new google.maps.Marker({
|
||||
map: Core.guessMap,
|
||||
map: Core.map,
|
||||
position: e.latLng,
|
||||
clickable: false,
|
||||
draggable: true,
|
||||
|
@ -19,7 +19,7 @@
|
||||
<div id="closeGuessButtonContainer" class="buttonContainer top">
|
||||
<button id="closeGuessButton" class="block gray">Close</button>
|
||||
</div>
|
||||
<div id="guessMap"></div>
|
||||
<div id="map"></div>
|
||||
<div id="guessButtonContainer" class="buttonContainer bottom">
|
||||
<button id="guessButton" class="block" disabled>Guess</button>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user