//
駅名で検索されない場合には、近郊の駅名で再検索して下さい。'; map.setCenter(new GLatLng(35.68923,139.752274), 13); return; } var bounds = new GLatLngBounds(); for (var i = 0; i < markers.length; i++) { var shop = markers[i].getAttribute('shop'); var shop_name = markers[i].getAttribute('shop_name'); var tofuken = markers[i].getAttribute('tofuken'); var shichoson = markers[i].getAttribute('shichoson'); var address = markers[i].getAttribute('address'); var phone = markers[i].getAttribute('phone'); var time = markers[i].getAttribute('time'); var tabako = markers[i].getAttribute('tabako'); var sake = markers[i].getAttribute('sake'); var distance = parseFloat(markers[i].getAttribute('distance')); var point = new GLatLng(parseFloat(markers[i].getAttribute('lat')), parseFloat(markers[i].getAttribute('lng'))); var marker = createMarker(point, shop, shop_name, tofuken, shichoson, address, phone, time, tabako, sake); map.addOverlay(marker); var sidebarEntry = createSidebarEntry(marker, shop, shop_name, address, tabako, sake, distance); sidebar.appendChild(sidebarEntry); bounds.extend(point); } map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds)); }); } function createMarker(point, shop, shop_name, tofuken, shichoson, address, phone, time, tabako, sake) { var gicons = []; gicons["daiso"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/daiso.png"); // ダイソーを表示 gicons["lawson"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/lawson.png"); // ローソン100を表示 gicons["shop99"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/shop99.png"); // shop99を表示 gicons["silk"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/silk.png"); // シルクを表示 gicons["seria"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/seria.png"); // セリアを表示 gicons["meets"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/meets.png"); // ミーツを表示 gicons["cando"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/cando.png"); // キャンドゥを表示 gicons["leplus"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/leplus.png"); // ル・プリュを表示 gicons["youyou"] = new GIcon(G_DEFAULT_ICON,"http://www.100-kin.com/image/marker/youyou.png"); // YouYouを表示 var marker = new GMarker(point, gicons[shop]); if(shop == "daiso"){ shop_com = "ダイソー"; } else if (shop == "lawson"){ shop_com = "ローソン100"; } else if (shop == "shop99"){ shop_com = "Shop99"; } else if (shop == "silk"){ shop_com = "シルク"; } else if (shop == "seria"){ shop_com = "セリア"; } else if (shop == "meets"){ shop_com = "ミーツ"; } else if (shop == "cando"){ shop_com = "キャンドゥ"; } else if (shop == "leplus"){ shop_com = "ル・プリュ"; } else if (shop == "youyou"){ shop_com = "YOUYOU"; } if(tabako == "y"){ tabako_com = "タバコ "; } else if (tabako == "n"){ tabako_com = ""; } if(sake == "y"){ sake_com = ""; } else if (sake == "n"){ sake_com = ""; } var html = '' + shop_com + ' [' + shop_name + ']
' + tofuken + shichoson + address + '
TEL:' + phone + '
営業時間:' + time + '
取扱:' + tabako_com + sake_com + '
情報の誤りがありましたら報告をお願いいたします。
'; GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); }); return marker; } function createSidebarEntry(marker, shop, shop_name, address, tabako, sake, distance) { var div = document.createElement('div'); if(shop == "daiso"){ shop_com = "ダイソー"; } else if (shop == "lawson"){ shop_com = "ローソン100"; } else if (shop == "shop99"){ shop_com = "Shop99"; } else if (shop == "silk"){ shop_com = "シルク"; } else if (shop == "seria"){ shop_com = "セリア"; } else if (shop == "meets"){ shop_com = "ミーツ(シルク)"; } else if (shop == "cando"){ shop_com = "キャンドゥ"; } else if (shop == "leplus"){ shop_com = "ル・プリュ(キャンドゥ)"; } else if (shop == "youyou"){ shop_com = "YOUYOU(キャンドゥ)"; } if(tabako == "y"){ tabako_com = ",タバコ"; } else if (tabako == "n"){ tabako_com = ""; } if(sake == "y"){ sake_com = ","; } else if (sake == "n"){ sake_com = ""; } var html = "" + shop_com + " (" + distance.toFixed(1) + "km) " + tabako_com + sake_com + "
" + shop_name; div.innerHTML = html; div.style.cursor = 'pointer'; div.style.marginBottom = '5px'; GEvent.addDomListener(div, 'click', function() { GEvent.trigger(marker, 'click'); }); GEvent.addDomListener(div, 'mouseover', function() { div.style.backgroundColor = '#eee'; }); GEvent.addDomListener(div, 'mouseout', function() { div.style.backgroundColor = '#fff'; }); return div; } //]]>