var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[35.011668600000000, 135.679920000000040], name:"風風の湯(ふふのゆ)", shopImg:"https://www.refle.info/salonImg/MzU3OEAwQDg0MTk3MDg3Y2RjN2JhZjk3YzFiN2UzMTIyZTNjYzY3QDkwQDQyMA%3D%3D.jpeg", open:"1", icon:"/images/googlemap/open/icon_bathhouse.png", scaledSize : new google.maps.Size(30, 34.5), manage:"25", genreName:"スーパー銭湯", url:"/shop/fufunoyu/", shopName:"風風の湯(ふふのゆ)", shopTel:"075-863-1126", reserve:"", time:"12:00~22:00(最終受付21:30)", closed:"年中無休(休館日有)", mapDisable:"0" }, {"latlng":[35.051763321263210, 135.782585746627030], 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/thegarden-kyoto/", shopName:"ササヨアンドソーオン", shopTel:"075-724-6666", reserve:"(完全予約制)", time:"10:00~20:00", closed:"不定休", mapDisable:"0" }, {"latlng":[35.012020195221360, 135.766344260118900], 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/kyoto-tamanoyu/", shopName:"玉の湯", shopTel:"075-231-2985", reserve:"", time:"15:00~24:00", closed:"日曜", mapDisable:"0" }, {"latlng":[35.010107100000000, 135.773860300000020], 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/magohashi-yu/", shopName:"孫橋湯(まごはしゆ)", shopTel:"075-771-2108", reserve:"", time:"15:00~24:00", closed:"水曜", mapDisable:"0" }, {"latlng":[35.010230404706680, 135.775337706745860], 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/yanagiyu/", shopName:"柳湯(やなぎゆ)", shopTel:"075-771-8439", reserve:"", time:"16:30~24:00", closed:"月曜、火曜", mapDisable:"0" }, {"latlng":[34.965409000000000, 135.706629400000000], name:"Natural Garden イオンモール京都桂川店", 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/natural-garden-katsuragawa/", shopName:"Natural Garden イオンモール京都桂川店", shopTel:"075-925-0275", reserve:"", time:"10:00~22:00", closed:"イオンモール京都桂川に準じる", mapDisable:"0" }, {"latlng":[35.010750300000000, 135.772576200000000], name:"SEPT NAIL(セプトネイル)三条本店", 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/septnail-sanjyo/", shopName:"SEPT NAIL(セプトネイル)三条本店", shopTel:"075-751-9110", reserve:"", time:"10:00~21:00/土日10:00~20: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; }