//東京都新宿区高田馬場3-2-8
TEL:03-3362-1238';
var point = new google.maps.LatLng(35.714118, 139.702998);
marker[0] = new google.maps.Marker({position: point, title:"ホテル ニュー高田"});
marker[0].setMap(map);
google.maps.event.addListener(marker[0], "click", function() {
clickMarker(35.714118, 139.702998, 0);
});
html[1] = 'ホテル エクセルシオ
東京都新宿区高田馬場3-2-9
TEL:03-5386-9886';
var point = new google.maps.LatLng(35.714277, 139.702935);
marker[1] = new google.maps.Marker({position: point, title:"ホテル エクセルシオ"});
marker[1].setMap(map);
google.maps.event.addListener(marker[1], "click", function() {
clickMarker(35.714277, 139.702935, 1);
});
}
function loadScript() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://maps.googleapis.com/maps/api/js?key=AIzaSyC6FmroPbUeWeiI0WVDFO9mpc9RZl2Ix1Y&callback=initialize";
document.body.appendChild(script);
}
function clickMarker(lat, lang, index){
if(infowindow) infowindow.close();
map.panTo(new google.maps.LatLng(lat, lang));
infowindow = new google.maps.InfoWindow({content: html[index]});
//吹き出しを表示する
infowindow.open(map, marker[index]);
}
window.onload = loadScript;
//]]>