var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.677248300000000, 135.536418100000000], name:"MARCO(まるこ)", 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/nail-marco/", shopName:"MARCO(まるこ)", shopTel:"06-7177-2337", reserve:"", time:"11:00~19:00", closed:"不定休", mapDisable:"0" }, {"latlng":[34.668614112512040, 135.565293942939550], name:"第二寿湯", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"1", icon:"/images/googlemap/open/shop_s_open.png", scaledSize : new google.maps.Size(10, 10), manage:"5", genreName:"銭湯(公衆浴場)", url:"/shop/daini-kotobukiyu/", shopName:"第二寿湯", shopTel:"06-6781-3751", reserve:"", time:"13:00~翌0:30", closed:"元旦", mapDisable:"0" }, {"latlng":[34.670804700000000, 135.542267700000020], name:"Nail Kiseki(ネイルキセキ)", 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/nail-kiseki/", shopName:"Nail Kiseki(ネイルキセキ)", shopTel:"06-6974-8688", reserve:"", time:"11:00~18:00(最終受付)", closed:"日曜日・木曜日 (ネイルイベント参加の為、変更あり)", mapDisable:"0" }, {"latlng":[34.679441100000000, 135.584477800000060], name:"極楽湯 東大阪店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"1", icon:"/images/googlemap/open/icon_bathhouse.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"スーパー銭湯", url:"/shop/gokurakuyu-higashiosaka/", shopName:"極楽湯 東大阪店", shopTel:"06-4309-1126", reserve:"", time:"6:00~翌2:00(最終受付1:30)", closed:"毎月第三木曜日", mapDisable:"0" }, {"latlng":[34.696149900000000, 135.589697200000050], name:"りらくる 東大阪稲田店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"1", icon:"/images/googlemap/open/icon_reflexology.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/riracle-higasioosaka-inada/", shopName:"りらくる 東大阪稲田店", shopTel:"050-8884-4499", reserve:"", time:"9:00~24:00(最終受付23:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.677185200000000, 135.566301699999940], name:"スーパー銭湯ユーパス Royal高井田店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"1", icon:"/images/googlemap/open/icon_bathhouse.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"スーパー銭湯", url:"/shop/yu-bath-t-bath/", shopName:"スーパー銭湯ユーパス Royal高井田店", shopTel:"06-6785-4126", reserve:"", time:"6:00~翌3:00(毎月第4月曜日は定期点検の為、昼12時からの営業)", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.682502300000000, 135.635225799999940], name:"風の湯 新石切店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"1", icon:"/images/googlemap/open/icon_bathhouse.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"スーパー銭湯", url:"/shop/tsurukame-oe/", shopName:"風の湯 新石切店", shopTel:"072-984-4126", reserve:"", time:"10:00~翌1:00(最終受付24:00)", 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; }