Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Images transition should be smoothier
- Loading branch information
Showing
3 changed files
with
152 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<meta charset="utf-8"> | ||
<title>Test Google StreetView NightMode issue</title> | ||
<script src="https://maps.googleapis.com/maps/api/js?v=3.26"></script> | ||
<style> | ||
#map, #pano { | ||
height: 100%; | ||
} | ||
html, body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
</head> | ||
<body onload="initMap();"> | ||
<table border="1" cellpadding="2" cellspacing="2" width="100%" height="100%"> | ||
<tr style="height:1%"> | ||
<td valign="middle" align="center" > | ||
<button type="button" onclick="showPtA()">First point<br>(day)</button> | ||
</td> | ||
<td valign="middle" align="center" > | ||
<button type="button" onclick="showPtB()">Second point<br>(night)</button> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<div id="map"> | ||
</div> | ||
</td> | ||
<td> | ||
<div id="pano" style="visibility:hidden"></div> | ||
</td> | ||
</tr> | ||
</table> | ||
<script> | ||
var map; | ||
var panorama; | ||
function initMap() { | ||
map = new google.maps.Map(document.getElementById('map'), { | ||
center: {lat: 35.720149, lng: -79.172462}, | ||
zoom: 8 | ||
}); | ||
panorama = new google.maps.StreetViewPanorama( | ||
document.getElementById('pano'), { | ||
pov: { | ||
heading: 34, | ||
pitch: 10 | ||
} | ||
}); | ||
map.setStreetView(panorama); | ||
} | ||
function showPtA() { | ||
var p = {lat:35.720691, lng:-79.186840}; | ||
map.setCenter(p); | ||
map.setZoom(16); | ||
document.getElementById("pano").style.visibility = ""; | ||
panorama.setPosition(p); | ||
console.log( document.getElementById('pano') ); | ||
document.getElementById('pano').onloadeddata = function() { console.log(1); } | ||
} | ||
function showPtB() { | ||
console.log( document.getElementById('pano').innerHTML ); | ||
var p = {lat:35.720624, lng:-79.186843}; | ||
map.setCenter(p); | ||
map.setZoom(16); | ||
document.getElementById("pano").style.visibility = ""; | ||
panorama.setPosition(p); | ||
} | ||
</script> | ||
</body> | ||
</html> |