var currentInfoWindow = null; //最後に開いた情報ウィンドウを記憶 var contentStr = null; var stationList = [ {"latlng":[33.886717400000000, 130.882034999999970], name:"てもみん VIERRA小倉店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_reflexology_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/temomin-oguraekinaka/", shopName:"てもみん VIERRA小倉店", shopTel:"093-512-7701", reserve:"", time:"11:00~21:00", closed:"年中無休(施設休館日を除く)", mapDisable:"0" }, {"latlng":[33.904375500000000, 130.805948899999980], name:"りらくる 北九州若松店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_reflexology_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/riracle-wakamatsu/", shopName:"りらくる 北九州若松店", shopTel:"050-8887-1008", reserve:"", time:"9:00~24:00(最終受付23:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[33.876601600000000, 130.867664000000000], name:"りらくる スピナガーデン大手町店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_reflexology_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/riracle-spina/", shopName:"りらくる スピナガーデン大手町店", shopTel:"050-8884-4527", reserve:"", time:"9:00~23:00(最終受付22:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[33.883176000000000, 130.728925600000030], name:"りらくる 八幡本城店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_reflexology_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/riraku-yawatahonzyo/", shopName:"りらくる 八幡本城店", shopTel:"050-8887-1004", reserve:"", time:"9:00~24:00(最終受付23:00)", closed:"年中無休", mapDisable:"0" }, {"latlng":[33.850980100000000, 130.747389099999960], name:"りらくる 八幡竹末店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_reflexology_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/riracle-yahata/", shopName:"りらくる 八幡竹末店", shopTel:"050-8884-4536", reserve:"", time:"9:00~24:00(最終受付23:00)", closed:"不定休", mapDisable:"0" }, {"latlng":[33.869421800000000, 130.880763399999980], name:"りらくる 小倉片野店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_reflexology_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/riraku-ogurakatano/", shopName:"りらくる 小倉片野店", shopTel:"050-8887-1006", reserve:"", time:"9:00~24:00(最終受付23:00)", closed:"年中無休", mapDisable:"0" }, {"latlng":[33.855998600000000, 130.951371500000050], name:"りらくる 小倉上吉田店", shopImg:"https://www.refle.info/salonImg/QEBAOTBANDIw.jpeg", open:"2", icon:"/images/googlemap/close/icon_reflexology_close.png", scaledSize : new google.maps.Size(20, 23), manage:"5", genreName:"リフレクソロジー", url:"/shop/riraku-ogurakamiyosida/", shopName:"りらくる 小倉上吉田店", shopTel:"050-8887-1000", reserve:"", time:"9:00~24:00(最終受付23: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; }