var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.679130274974600, 135.508688228836040], name:"Neo Mrs.Cyan(ネオミセスシアン)", shopImg:"https://www.refle.info/salonImg/ODMwMUAxMEA2N2Y4NjhmNmEwOWFhQDkwQDQyMA%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/neo-mrs-cyan/", shopName:"Neo Mrs.Cyan(ネオミセスシアン)", shopTel:"070-8975-5151", reserve:"(完全予約制)", time:"11:00~翌5:00(受付時間10:00~翌3:30)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.679140594980730, 135.507018958895500], name:"Mrs.Feliciarc 堺筋本町店(ミセスフェリシアーク)", shopImg:"https://www.refle.info/salonImg/ODQ3OEAxMEA2OTNiNmYzZDUxZmJlQDkwQDQyMA%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/feliciarc/", shopName:"Mrs.Feliciarc 堺筋本町店(ミセスフェリシアーク)", shopTel:"070-9004-9199", reserve:"(完全予約制)", time:"11:00~翌5:00(受付時間10:00~翌3:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.698367911869720, 135.504655401359370], name:"Royal RODY Head Spa(ロイヤルロディヘッドスパ)", shopImg:"https://www.refle.info/salonImg/ODEwNkAxMEA2NmFkZTkyZDc3NjllQDkwQDQyMA%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/royal-rody-head-spa/", shopName:"Royal RODY Head Spa(ロイヤルロディヘッドスパ)", shopTel:"080-7277-4890", reserve:"(完全予約制)", time:"10:00~24:00(受付時間9:00~24:00)", closed:"年末年始", mapDisable:"0" }, {"latlng":[34.731527559336400, 135.503871375653400], name:"Mrs.Feliciarc 新大阪店(ミセスフェリシアーク)", shopImg:"https://www.refle.info/salonImg/ODQ3OUAxMEA2OTNiNmYyZDUyYjY3QDkwQDQyMA%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/feliciarc-shinosaka/", shopName:"Mrs.Feliciarc 新大阪店(ミセスフェリシアーク)", shopTel:"070-9004-9199", reserve:"(完全予約制)", time:"11:00~翌5:00(受付時間10:00~翌3:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.668003971491220, 135.505784764417970], name:"俺のエステ", shopImg:"https://www.refle.info/salonImg/MTczMUAxMEA1ZThmNTVhZTg1NDQzQDkwQDQyMA%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/oreno-esute/", shopName:"俺のエステ", shopTel:"06-6213-6900", reserve:"(予約優先)", time:"10:00~翌5:00", closed:"年中無休", mapDisable:"0" }, {"latlng":[34.682257259267340, 135.817644830094200], name:"fable(フェーブル)", shopImg:"https://www.refle.info/salonImg/NTc1M0AxMEA2MDYzYjkwODYzMDI2QDkwQDQyMA%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/fable/", shopName:"fable(フェーブル)", shopTel:"090-4278-1011", reserve:"(完全予約制)", time:"12:00~翌1:00(最終受付22: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; }