var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.676786279432150, 135.506888980339450], name:"XILLIA(エクシリア)", shopImg:"https://www.refle.info/salonImg/NDYxMEAxMEA2MjI1NTA3MDU3ZmVkQDkwQDQyMA%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/xillia777/", shopName:"XILLIA(エクシリア)", shopTel:"080-4493-7672", reserve:"(予約優先)", time:"10:00~翌5:00(最終受付翌4:00)", closed:"年末年始", mapDisable:"0" }, {"latlng":[34.676747883527980, 135.503820423313530], name:"LOVE+(ラブプラス)", shopImg:"https://www.refle.info/salonImg/NzM5NEAxMEA2MjU5YTQ3ODcwY2E4QDkwQDQyMA%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/love-plus/", shopName:"LOVE+(ラブプラス)", shopTel:"080-9752-3223", reserve:"(完全予約制)", time:"10:00~23:00(最終受付)", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.677557529341210, 135.509819299999980], name:"CLUB LEGGENDA(クラブレジェンダ)", shopImg:"https://www.refle.info/salonImg/NzczMkAxMEA2NWMxOGM4MzM2ZjYzQDkwQDQyMA%3D%3D.jpeg", open:"2", icon:"/images/googlemap/close/icon_massage_close.png", scaledSize : new google.maps.Size(30, 34.5), manage:"30", genreName:"メンズエステ", url:"/shop/club-leggenda/", shopName:"CLUB LEGGENDA(クラブレジェンダ)", shopTel:"080-4709-6286", reserve:"", time:"16:00~翌4:00(受付時間12:00~翌3:30)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.676774943955350, 135.505169715356740], name:"なにわ女子", shopImg:"https://www.refle.info/salonImg/Nzg5NEA1QDY1Njk2ZGUxMTMxYTdAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_massage_close.png", scaledSize : new google.maps.Size(30, 34.5), manage:"30", genreName:"メンズエステ", url:"/shop/naniwajoshi/", shopName:"なにわ女子", shopTel:"080-7385-5289", reserve:"(完全予約制)", time:"14:00~翌5:00(最終受付翌3:30)", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.677564968174195, 135.509817205522500], name:"CULLINAN(カリナン)", shopImg:"https://www.refle.info/salonImg/NzAxNUAxMEA2MGM5YTJhOThjMzIwQDkwQDQyMA%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/cullinan/", shopName:"CULLINAN(カリナン)", shopTel:"080-6782-1915", reserve:"(予約優先)", time:"10:00~翌3:00(最終受付)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.675776675748760, 135.507319024981830], name:"FROG SPA(フロッグスパ)", shopImg:"https://www.refle.info/salonImg/NjM1NUAxMEA2NTI0ZjIwYWUzNWFmQDkwQDQyMA%3D%3D.jpeg", open:"2", icon:"/images/googlemap/close/icon_massage_close.png", scaledSize : new google.maps.Size(30, 34.5), manage:"30", genreName:"メンズエステ", url:"/shop/frog-spa/", shopName:"FROG SPA(フロッグスパ)", shopTel:"080-3832-1844", reserve:"(完全予約制)", time:"12:00~翌3:00(受付時間10:00~翌1: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; }