var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.788384337471630, 135.458829553373000], name:"le meilleur(ル・メイユール)", shopImg:"https://www.refle.info/salonImg/NzQ3NUAxMEA2MmE5NjY3ZDA5OTkwQDkwQDQyMA%3D%3D.jpeg", open:"1", icon:"/images/googlemap/open/icon_massage.png", scaledSize : new google.maps.Size(30, 34.5), manage:"30", genreName:"メンズエステ", url:"/shop/lemeilleurspa/", shopName:"le meilleur(ル・メイユール)", shopTel:"080-3494-8471", reserve:"(完全予約制)", time:"10:00~翌2:00(最終受付)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.790772800000000, 135.441126600000000], name:"GINZA BODY CARE(ギンザボディケア) 大阪空港店", 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/ginzabodycare-oosaka/", shopName:"GINZA BODY CARE(ギンザボディケア) 大阪空港店", shopTel:"06-6842-3780", reserve:"", time:"10:00~20:00", closed:"不定休", mapDisable:"0" }, {"latlng":[34.808540600000000, 135.494067099999940], name:"LEDジェットネイル千里本店(レドジェットネイルセンリホンテン)", 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/jet-nail/", shopName:"LEDジェットネイル千里本店(レドジェットネイルセンリホンテン)", shopTel:"06-6318-6437", reserve:"", time:"10:00~22:00/日10:00~19:00(月~土:最終受付21:00/日祝:18:00)", closed:"なし", mapDisable:"0" }, {"latlng":[34.810368300000000, 135.494978100000030], name:"PLUMERIA(プルメリア)", 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/plumeria-senrityuuou/", shopName:"PLUMERIA(プルメリア)", shopTel:"06-6170-3039", reserve:"", time:"10:00~20:00", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.791486400000000, 135.440457400000000], name:"Queensway(クイーンズウェイ)大阪空港店", 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/queensway-qs-oosaka/", shopName:"Queensway(クイーンズウェイ)大阪空港店", shopTel:"06-6842-3780", reserve:"", time:"10:00~20:00", closed:"不定休", mapDisable:"0" }, {"latlng":[34.786885400000000, 135.464172400000050], 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/toyonaka-onsen/", shopName:"豊中温泉(とよなかおんせん)", shopTel:"06-6852-1258", reserve:"", time:"15:00~翌0: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; }