如何在我的网站上显示谷歌地图侧窗信息? 这就是它现在在我的网站上显示的内容:
但这就是我想要的:
我正在使用此代码,它只是用标记显示位置:
function showGoogleMaps() {
if (document.getElementById("GPMAP").value == "test1"){
}
if (document.getElementById("GPMAP").value == "test2"){
var position = [52.077488, 4.262157];
}
if (document.getElementById("GPMAP").value == "test3"){
var position = [52.073351, -1.014658];
}
if (document.getElementById("GPMAP").value == "test4"){
var position = [22.077488, 4.262157];
}
var latLng = new google.maps.LatLng(position[0], position[1]);
var mapOptions = {
zoom: 16, // initialize zoom level - the max value is 21
streetViewControl: false, // hide the yellow Street View pegman
scaleControl: true, // allow users to zoom the Google Map
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: latLng
};
map = new google.maps.Map(document.getElementById('googlemaps'),
mapOptions);
// Show the default red marker at the location
marker = new google.maps.Marker({
position: latLng,
map: map,
draggable: false,
animation: google.maps.Animation.DROP
});
}
那么如何显示包含所有评论和照片等的侧窗?