Google지도 샘플에서 : http://code.google.com/apis/maps/documentation/javascript/examples/streetview-simple.html
예를 들어 사용자가 바다의 한가운데에서 작은 사람을 멀리 떨어 뜨린 경우 사라집니다.
그러나 Google지도 웹 사이트 http://maps.google.com/에서 스트리트 뷰를 표시하고 사용자가 그 사람을 끌었다면 자동으로 이전 지점으로 돌아갑니다.Google지도에있는 작은 녀석을 던지면 가장 가까운 지점으로 돌아 가게하는 방법은 무엇입니까?
첫 번째 예에서 Google지도 웹 사이트와 동일하게 동작하지 않게 된 부분은 무엇입니까?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example: Street View Layer</title>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/standard.css" rel="stylesheet" type="text/css" />
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
var fenway = new google.maps.LatLng(42.345573,-71.098326);
var mapOptions = {
center: fenway,
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(
document.getElementById("map_canvas"), mapOptions);
var panoramaOptions = {
position: fenway,
pov: {
heading: 34,
pitch: 10,
zoom: 1
}
};
var panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"),panoramaOptions);
map.setStreetView(panorama);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width: 400px; height: 300px"></div>
<div id="pano" style="position:absolute; left:410px; top: 8px; width: 400px; height: 300px;"></div>
</body>
</html>
내가 정확히를했고, I 해당 파노라마를 참조하십시오 .setPosition (last_location); 올바른 last_location을 사용하여 호출되고 있지만지도와 파노라마는 결코 돌아 오지 않으며 파노라마는 공백으로 유지됩니다. 내가 아직도 놓친 뭔가가 있니? –
여기도 행운이 없습니다. 페그 만은 항상 뒤로 물러서. 나는 이것이 새로운 위치를 잡으려 고 시도한 후에 일어난다 고 생각합니다. –