var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.668003971491220, 135.505784764417970], name:"俺のエステ", shopImg:"https://www.refle.info/salonImg/MTczMUAxMEA1ZThmNTVhZTg1NDQzQDkwQDQyMA%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/oreno-esute/", shopName:"俺のエステ", shopTel:"06-6213-6900", reserve:"(予約優先)", time:"10:00~翌5:00", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.664066008092250, 135.496517511639470], 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.663274122820650, 135.499631028241770], name:"High Room(ハイルーム)ミナミ", shopImg:"https://www.refle.info/salonImg/Mjk2NUAwQDZkY2U2ZjE2MjZjODM4NzkyYmUwZTNlNGVmMzk0MmZjQDkwQDQyMA%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/high-room/", shopName:"High Room(ハイルーム)ミナミ", shopTel:"06-6484-7295", reserve:"(完全予約制)", time:"10:00~24:00(受付時間9:30~23:00)", closed:"年末年始", mapDisable:"0" }, {"latlng":[34.670030767109380, 135.497534953392800], name:"my graduation(マイグラジュエーション)", shopImg:"https://www.refle.info/salonImg/NzkyNUAxMEA2NThiZGQwMTg1ZWQyQDkwQDQyMA%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/my-graduation/", shopName:"my graduation(マイグラジュエーション)", shopTel:"080-4480-9738", reserve:"(完全予約制)", time:"9:00~翌6:00(受付時間8:00~翌5:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.666502618269845, 135.498822301223400], name:"VISCONTI(ヴィスコンティ)", shopImg:"https://www.refle.info/salonImg/NTA4MkAxMEA1ZWUwMjIwNWVhZjQ5QDkwQDQyMA%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/visconti/", shopName:"VISCONTI(ヴィスコンティ)", shopTel:"080-9601-0184", reserve:"(完全予約制)", time:"10:00~翌3:00(最終受付)", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.668144323762220, 135.493661392046000], name:"Like A Angel(ライク ア エンジェル)", shopImg:"https://www.refle.info/salonImg/Nzg0MUA1QDY1MTQwMmZjYTlmNWRAOTBANDIw.jpeg", open:"1", icon:"/images/googlemap/open/icon_massage.png", scaledSize : new google.maps.Size(30, 34.5), manage:"30", genreName:"メンズエステ", url:"/shop/like-a-angel/", shopName:"Like A Angel(ライク ア エンジェル)", shopTel:"080-4978-7257", reserve:"(完全予約制)", time:"11:00~翌2:00(受付時間10:30~24:30)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.671104919268670, 135.500707435581940], name:"MEN’S TBC 難波店", shopImg:"https://www.refle.info/salonImg/NjI5QDBANDk4NGM4MGVjOGYxYmIyM2UxMjc0MTZlMmY3NDgxMTFAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_mbeauty.png", scaledSize : new google.maps.Size(30, 34.5), manage:"25", genreName:"メンズエステティック", url:"/shop/tbc-namba/", shopName:"MEN’S TBC 難波店", shopTel:"0120-025236", reserve:"(要予約)", time:"12:00~21:00/土日祝10:00~19:00", closed:"不定休", mapDisable:"0" }, {"latlng":[34.666821200000000, 135.500699299999950], name:"ダンディハウス なんば店", shopImg:"https://www.refle.info/salonImg/MTg3NkAwQDdjNzJjMmJiYmRlMjk2NzY2MDAxN2FiYTYzYjFkMGQyQDkwQDQyMA%3D%3D.jpeg", open:"2", icon:"/images/googlemap/close/icon_mbeauty.png", scaledSize : new google.maps.Size(30, 34.5), manage:"25", genreName:"メンズエステティック", url:"/shop/dandy-namba/", shopName:"ダンディハウス なんば店", shopTel:"0120-552-011", reserve:"(完全予約制)", time:"11:00~21:00/土日祝10:00~19: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; }