var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[34.561414000000000, 135.512192400000000], name:"からだ工房“動楽”", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/kkmtubo/", shopName:"からだ工房“動楽”", shopTel:"072-257-3929", reserve:"", time:"9:00~21:00(最終受付19:30)", closed:"不定休", mapDisable:"0" }, {"latlng":[34.576687000000010, 135.497346500000050], name:"中央カイロプラクティック院 堺", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/chiro-sakai/", shopName:"中央カイロプラクティック院 堺", shopTel:"0120-1379-49", reserve:"(完全予約制)", time:"9:30~19:30(12:30~15:30迄休診)", closed:"木曜、日曜", mapDisable:"0" }, {"latlng":[34.559866400000000, 135.489567099999930], name:"堺自然整体院", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/otori/", shopName:"堺自然整体院", shopTel:"072-243-2000", reserve:"", time:"未定", closed:"不定休", mapDisable:"0" }, {"latlng":[34.795477800000000, 135.449142700000040], name:"壮健塾", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/katakori-youtu/", shopName:"壮健塾", shopTel:"06-6857-3190", reserve:"(要予約)", time:"10:00~21:00", closed:"木曜、毎週木曜以外は不定休", mapDisable:"0" }, {"latlng":[34.720406200000000, 135.480172300000050], name:"山岸健康院", shopImg:"https://www.refle.info/salonImg/MTNAMEA2YzJjOGI2OTI4NDEyNmY2ODVlN2JlMWIyYzAwZGI2ZUA5MEA0MjA%3D.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/yamagishi/", shopName:"山岸健康院", shopTel:"06-6301-6244", reserve:"", time:"9:00~18:30(11:30~15:00迄休診)", closed:"水曜、日曜", mapDisable:"1" }, {"latlng":[34.554631200000000, 135.504448899999940], name:"のぞみ整体院", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/ducpt807/", shopName:"のぞみ整体院", shopTel:"072‐250‐5570", reserve:"(完全予約制)", time:"9:00~20:00(最終受付)/火15:00~20:00(最終受付)/土9:00~17:00(最終受付)(12:00~15:00迄休診)", closed:"水曜", mapDisable:"0" }, {"latlng":[34.683847100000000, 135.501676500000030], name:"ほぐし屋 COCOKARADA 本町店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/coco-karada-honmachi/", shopName:"ほぐし屋 COCOKARADA 本町店", shopTel:"06-6266-0246", reserve:"", time:"11:00~21:00(最終受付)/土11:00~16:00(最終受付)", closed:"日曜、祝日", mapDisable:"0" }, {"latlng":[34.779650100000000, 135.470350400000000], name:"さくらづか治療院", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_bodywork_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"整体院", url:"/shop/sakurazuka-chiro/", shopName:"さくらづか治療院", shopTel:"06-6855-8290", reserve:"(予約優先)", time:"10:00~20:00/土日10:00~17:00", closed:"火曜、祝日、毎週火曜・祝日以外第3日曜日", 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; }