Javascript 显示多个标记的相同街道视图的信息窗口?
信息窗口显示街景,但多个标记显示相同的街景。 它以最后一个地址显示所有标记中的街景 代码: 如何处理(街景全景)以显示具有多个标记的街景。Javascript 显示多个标记的相同街道视图的信息窗口?,javascript,google-maps,google-maps-api-3,Javascript,Google Maps,Google Maps Api 3,信息窗口显示街景,但多个标记显示相同的街景。 它以最后一个地址显示所有标记中的街景 代码: 如何处理(街景全景)以显示具有多个标记的街景。 谢谢@geocodezip是的,我正在看这种带有街景的信息窗口。但我的代码有问题。现在,我得到了多个信息窗口相同的街景。你能给我一些东西来解决我的问题吗。感谢您不是我的示例工作(在每个信息窗口中显示不同的街景图像)?是的,我需要在街景中根据“{!acc.BillingCity}”等地址为多个信息窗口显示不同的图像。@geocodezipdeled了我的答案,
谢谢@geocodezip是的,我正在看这种带有街景的信息窗口。但我的代码有问题。现在,我得到了多个信息窗口相同的街景。你能给我一些东西来解决我的问题吗。感谢您不是我的示例工作(在每个信息窗口中显示不同的街景图像)?是的,我需要在街景中根据“{!acc.BillingCity}”等地址为多个信息窗口显示不同的图像。@geocodezipdeled了我的答案,但我认为这是解决方案的一部分。但是,如果有我们不知道的代码和先决条件,解决这个问题几乎是不可能的。
geocoder.geocode( { 'address': "{!acc.BillingCity}"}, function(results, status) {
alert("{!acc.BillingCity}");
if (status == google.maps.GeocoderStatus.OK) {
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location,
title : 'Click Here!!!'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map, marker);
});
var pano = null;
google.maps.event.addListener(infowindow, 'domready', function() {
if (pano != null) {
pano.unbind("position");
pano.setVisible(false);
}
pano = new google.maps.StreetViewPanorama(document.getElementById("content"), {
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.ANDROID
},
enableCloseButton: false,
addressControl: false,
linksControl: false
});
pano.bindTo("position", marker);
pano.setVisible(true);
});
google.maps.event.addListener(infowindow, 'closeclick', function() {
pano.unbind("position");
pano.setVisible(false);
pano = null;
});
markerBounds.extend(results[0].geometry.location);
map.fitBounds(markerBounds);
}else if(status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) {
wait = true;
setTimeout("wait = true", 2000);
} else {
alert("Geocode was not successful for the following reason: " + status);
}
});