var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.742861985932880, 135.356764407934550], name:"Larus(ラルス)", shopImg:"https://www.refle.info/salonImg/NzU2NEAxMEA2MzJhY2M4ZTViYTRkQDkwQDQyMA%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/larusspa/", shopName:"Larus(ラルス)", shopTel:"080-2396-2146", reserve:"(完全予約制)", time:"10:00~翌3:00", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.735029408816450, 135.339235653372950], name:"S-class(エスクラス)", shopImg:"https://www.refle.info/salonImg/Nzk2MUAxMEA2NWQ2YjQ0Nzg5M2ZmQDkwQDQyMA%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/sclassdesu/", shopName:"S-class(エスクラス)", shopTel:"080-4293-2508", reserve:"(完全予約制)", time:"10:00~翌3:00", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.734405665905320, 135.340531229027400], name:"癒Girls(いやしガールズ)", shopImg:"https://www.refle.info/salonImg/NjI3N0AxMEA2NTc4OWYwNGQyNzg2QDkwQDQyMA%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/iyashi-girls/", shopName:"癒Girls(いやしガールズ)", shopTel:"070-1768-9394", reserve:"(要予約)", time:"10:00~翌5:00(最終受付翌4:00)", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.736679619576780, 135.336158774439240], name:"フェアリータッチ", shopImg:"https://www.refle.info/salonImg/NzkyNkAxMEA2NWRkZTNlYTMyZDI2QDkwQDQyMA%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/fairy-touch/", shopName:"フェアリータッチ", shopTel:"080-4021-1925", reserve:"(完全予約制)", time:"10:00~翌2:00", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.736012997457960, 135.339298197226400], name:"KoBe Runway(コウベランウェイ)", shopImg:"https://www.refle.info/salonImg/NzIzOEA1QDYxZWEzYWQ0YmZlOTdAOTBANDIw.jpeg", open:"1", icon:"/images/googlemap/open/icon_massage.png", scaledSize : new google.maps.Size(30, 34.5), manage:"30", genreName:"メンズエステ", url:"/shop/kobe-runway/", shopName:"KoBe Runway(コウベランウェイ)", shopTel:"080-6335-4088", reserve:"(完全予約制)", time:"10:00~翌3:00(最終受付)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.734371113887455, 135.340707942391730], name:"DEA 阪神西宮店(デーア)", shopImg:"https://www.refle.info/salonImg/Njk5MkAxMEA2MGM3MjY1MGIwMDE0QDkwQDQyMA%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/dea-kobe/", shopName:"DEA 阪神西宮店(デーア)", shopTel:"080-5853-9111", reserve:"", time:"10:00~翌3:00(受付時間10:00~翌2:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.737087733797665, 135.373819982209060], name:"DEA 阪神西宮店(デーア)", shopImg:"https://www.refle.info/salonImg/Njk5MkAxMEA2MGM3MjY1MGIwMDE0QDkwQDQyMA%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/dea-kobe/", shopName:"DEA 阪神西宮店(デーア)", shopTel:"080-5853-9111", reserve:"", time:"10:00~翌3:00(受付時間10:00~翌2: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; }