0
(對不起我的英文)我有一個問題closebutton ,,,我正嘗試建立在用戶點擊一個多邊形,並將其移動用戶與谷歌街景另一頁網頁查看全景(這我有)。但我也需要一個代碼,點擊關閉按鈕後,全景移動用戶從「全景頁」回「多邊形」頁。我試圖使用相同的代碼就像我之前使用的移動用戶爲「全景頁面」,但它doesn't工作(它只是關閉的全景,但doesn't回遷「多邊形頁」)。該行:如何設置其他功能全景
google.maps.event.addListener(panorama, "closeclick", function(event) { window.location = "index.html"; })
是將用戶移回「多邊形頁面」(index.html)的代碼。這裏是整個代碼:
function initialize() {
var panoOptions = {
pano: 'Kuchyn',
enableCloseButton: true,
pov: {
heading: 0,
pitch: 0,
zoom: 0
},
panoProvider: getCustomPanorama,
visible: true};
var panorama = new google.maps.StreetViewPanorama(
document.getElementById('map-canvas'), panoOptions);
function getCustomPanoramaTileUrl(pano, zoom, tileX, tileY) {
return 'images/Untitled.jpg';}
function getCustomPanorama(pano, zoom, tileX, tiley) {
if (pano == 'Kuchyn') {
return {
location:
{pano: 'Kuchyn',
description: 'Kromeriz - Kuchyn'},
links: [],
copyright: 'Oznog (c) 2013',
Heading: 180,
tiles:
{tileSize: new google.maps.Size(4096, 2048),
worldSize: new google.maps.Size(4096, 2048),
centerHeading: 180,
verticalFOV: 90,
getTileUrl: getCustomPanoramaTileUrl}
};
}
}
}
google.maps.event.addDomListener(window, 'load', initialize);
google.maps.event.addListener(panorama, "closeclick", function(event) { window.location = "index.html"; })
請幫我1月
你是神! :) :) :) TNX,TNX,TNX :) – oznog 2013-05-05 16:15:24