var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.650192700000000, 135.505705000000030], name:"スパワールド", shopImg:"https://www.refle.info/salonImg/NTVAMEAxODU3NWEzMTRhYWU2MWIxODBjNjYyYzBhOWJhNTA3M0A5MEA0MjA%3D.jpeg", open:"1", icon:"/images/googlemap/open/icon_bathhouse.png", scaledSize : new google.maps.Size(30, 34.5), manage:"25", genreName:"スーパー銭湯", url:"/shop/spaworld/", shopName:"スパワールド", shopTel:"06-6631-0001", reserve:"", time:"24時間営業(利用施設によって異なる)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.652655434898740, 135.506822226389320], name:"新世界ラジウム温泉", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/shop_s_close.png", scaledSize : new google.maps.Size(10, 10), manage:"5", genreName:"銭湯(公衆浴場)", url:"/shop/radium/", shopName:"新世界ラジウム温泉", shopTel:"06-6641-3093", reserve:"", time:"6:00~24:00", closed:"第2・4木曜日、元旦", mapDisable:"0" }, {"latlng":[34.650814258932610, 135.523333664418030], name:"よしの湯", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/shop_s_close.png", scaledSize : new google.maps.Size(10, 10), manage:"5", genreName:"銭湯(公衆浴場)", url:"/shop/yoshinoyu/", shopName:"よしの湯", shopTel:"06-6779-2411", reserve:"", time:"14:00~翌1:00", closed:"毎月5日、15日、25日(※日曜日の場合は営業)", mapDisable:"0" }, {"latlng":[34.646826400000000, 135.507241000000020], name:"和光", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bathhouse_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"スーパー銭湯", url:"/shop/ofuroya-wako/", shopName:"和光", shopTel:"06-6641-6675", reserve:"", time:"6:00~24:00", closed:"水曜", mapDisable:"0" }, {"latlng":[34.648175784295894, 135.527087749073760], name:"天竜湯", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/shop_s_close.png", scaledSize : new google.maps.Size(10, 10), manage:"5", genreName:"銭湯(公衆浴場)", url:"/shop/tenryuyu/", shopName:"天竜湯", shopTel:"06-6731-8948", reserve:"", time:"14:00~翌0:30/日9:00~翌0:30(最終受付24:00)", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.648753291166210, 135.502264557077780], name:"入船温泉(いりふねおんせん)", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/shop_s_close.png", scaledSize : new google.maps.Size(10, 10), manage:"5", genreName:"銭湯(公衆浴場)", url:"/shop/irihune/", shopName:"入船温泉(いりふねおんせん)", shopTel:"06-6641-2681", reserve:"", time:"6:00~24:00(最終受付23:30)", closed:"月曜", mapDisable:"0" }, {"latlng":[34.645037800000000, 135.510518600000070], name:"湯処 あべの橋", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/shop_s_close.png", scaledSize : new google.maps.Size(10, 10), manage:"5", genreName:"銭湯(公衆浴場)", url:"/shop/abenobashi/", shopName:"湯処 あべの橋", shopTel:"06-7890-1126", reserve:"", time:"12:00~24:00(最終受付23:30)", closed:"木曜", mapDisable:"0" }]; function createMarker(map, i) { //マーカーを作成 station = stationList[i]; latlng = new google.maps.LatLng(station.latlng[0], station.latlng[1]); title = station.name; genreName = station.genreName; manage = station.manage; if(station.url){ imgurl = ''+station.shopName+''; url = ''+station.shopName+''; }else{ imgurl = station.shopName; url = station.shopName; } if(manage <= 5){ contentStr = '
'; contentStr += '

'+url+'

'; contentStr += '

'+genreName+'

'; contentStr += '
'; }else if(manage <= '10'){ contentStr = '
'; contentStr += '

'+url+'

'; contentStr += '
'+imgurl+'
'; contentStr += '
'; contentStr += '

'+genreName+'

'; contentStr += '

'+station.time+'

'; contentStr += '

'+station.closed+'

'; contentStr += '
'; contentStr += '
'; }else{ contentStr = '
'; contentStr += '

'+url+'

'; contentStr += '
'+imgurl+'
'; contentStr += '
'; contentStr += '

'+genreName+'

'; contentStr += '

'+station.time+'

'; contentStr += '

'+station.closed+'

'; contentStr += '
'; contentStr += '
'; } image = "image"+i; var image = { url: station.icon, scaledSize : station.scaledSize } var marker = new google.maps.Marker({ position : latlng, icon : image, map : map, title : title }); var infoWnd = new google.maps.InfoWindow({ content : contentStr }); //マーカーがクリックされたら、情報ウィンドウを表示 google.maps.event.addListener(marker, "click", function(){ if (currentInfoWindow) { currentInfoWindow.close(); } infoWnd.open(map, marker); currentInfoWindow = infoWnd; }); return marker; }