-
Notifications
You must be signed in to change notification settings - Fork 0
/
street.html
27 lines (27 loc) · 1.09 KB
/
street.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">
var map;
var sv = new google.maps.StreetViewService();
var panorama;
function initSV(lat,lng) {
panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"),{navigationControl:false,linksControl: false,enableCloseButton: false,});
sv.getPanoramaByLocation(new google.maps.LatLng(lat,lng), 50, processSVData);
}
function processSVData(data, status) {
if (status == google.maps.StreetViewStatus.OK) {
panorama.setVisible(true);
panorama.setPano(data.location.pano);
panorama.setPov({heading: 10,pitch: 0,zoom: 1});
panorama.setVisible(true);
}
}
</script>
</head>
<body><div id="pano" style="width:100%; height:100%;">
<script>initSV(39.569537, 2.638178);</script>
</div></body>
</html>