// JavaScript Document
var map;
var marker_list=[];
var txt_list=[];
var marker_index=0;

function load() {
if (GBrowserIsCompatible()) {

//地図を作成
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(35.711117, 139.796358), 17);
map.addControl(new GLargeMapControl3D());
//var gx = new GGeoXml("http://goonee.net/asakusa/asakusaenju.kml");
//map.addOverlay(gx);

/*
	//オリジナルマーカーの画像を作成
	var icon = new GIcon();
	icon.image = "http://www.asakusa.gr.jp/common/images/icon_1.png";
	icon.shadow = "http://www.asakusa.gr.jp/common/images/icon_2.png";
	icon.iconSize = new GSize(35, 35);
	icon.shadowSize = new GSize(35, 35);
	icon.iconAnchor = new GPoint(0, 35);
	icon.infoWindowAnchor = new GPoint(18, 11);
*/

	//var marker = new GMarker(movePoint,icon);
	//map.addOverlay(marker);

var txt="<img src='images/photo_marushin.jpg' width='219' height='144'><br><a href='marushin.html'>葵丸進</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711236,139.794977),txt);

var txt="<img src='images/photo_sansada.jpg' width='219' height='144'><br><a href='marushin.html'>雷門三定</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711034,139.796707),txt);

var txt="<img src='images/photo_nakasei.jpg' width='219' height='144'><br><a href='marushin.html'>中清</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712654,139.794652),txt);

var txt="<img src='images/photo_kura.jpg' width='219' height='144'><br><a href='kura.html'>蔵</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712151,139.795846),txt);

var txt="<img src='images/photo_kusatsutei.jpg' width='219' height='144'><br><a href='kusatsutei.html'>浅草田甫　草津亭</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.716709,139.795243),txt);

var txt="<img src='images/photo_kobayashi.jpg' width='219' height='144'><br><a href='kobayashi.html'>こばやし</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712269,139.797187),txt);

var txt="<img src='images/photo_icchome.jpg' width='219' height='144'><br><a href='icchome.html'>一丁目</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711735,139.795245),txt);

var txt="<img src='images/photo_yoshida.jpg' width='219' height='144'><br><a href='yoshida.html'>鮨よしだ</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.713194,139.797758),txt);

var txt="<img src='images/photo_seiji.jpg' width='219' height='144'><br><a href='seiji.html'>すし処　清司</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.716866,139.796691),txt);

var txt="<img src='images/photo_tsunezushi.jpg' width='219' height='144'><br><a href='tsunezushi.html'>常寿司</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712075,139.794116),txt);

var txt="<img src='images/photo_asadori.jpg' width='219' height='144'><br><a href='asadori.html'>麻鳥</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712234,139.796313),txt);

var txt="<img src='images/photo_iidaya.jpg' width='219' height='144'><br><a href='iidaya.html'>どぜう飯田屋</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.714174,139.791541),txt);

var txt="<img src='images/photo_hatsuogawa.jpg' width='219' height='144'><br><a href='hatsuogawa.html'>初小川</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.709708,139.794561),txt);

var txt="<img src='images/photo_imahan.jpg' width='219' height='144'><br><a href='imahan.html'>浅草今半</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.714004,139.792217),txt);

var txt="<img src='images/photo_ramuya.jpg' width='219' height='144'><br><a href='ramuya.html'>らむや</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.713085,139.79859),txt);

var txt="<img src='images/photo_ichimatsu.jpg' width='219' height='144'><br><a href='ichimatsu.html'>茶寮　一松</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.710851,139.793365),txt);

var txt="<img src='images/photo_sankaku.jpg' width='219' height='144'><br><a href='sankaku.html'>三角</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711705,139.795666),txt);

var txt="<img src='images/photo_azuma.jpg' width='219' height='144'><br><a href='azuma.html'>浅草うまいもん　あづま</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711824,139.797032),txt);

var txt="<img src='images/photo_kamiyabar.jpg' width='219' height='144'><br><a href='kamiyabar.html'>神谷バー</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.71096,139.797506),txt);

var txt="<img src='images/photo_tsukimiso.jpg' width='219' height='144'><br><a href='tsukimiso.html'>月見草</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.709906,139.795983),txt);

var txt="<img src='images/photo_nidodamore.jpg' width='219' height='144'><br><a href='nidodamore.html'>にぃど・だもぉれ</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.716731,139.800671),txt);

var txt="<img src='images/photo_manos.jpg' width='219' height='144'><br><a href='manos.html'>ロシア料理マノス</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.710441,139.795489),txt);

var txt="<img src='images/photo_waka.jpg' width='219' height='144'><br><a href='waka.html'>和風れすとらん若</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.716761,139.801058),txt);

var txt="<img src='images/photo_katori.jpg' width='219' height='144'><br><a href='katori.html'>食処・茶処　かと里</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711646,139.797308),txt);

var txt="<img src='images/photo_namikitei.jpg' width='219' height='144'><br><a href='namikitei.html'>なみき亭</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.709932,139.79094),txt);

var txt="<img src='images/photo_ryuen.jpg' width='219' height='144'><br><a href='ryuen.html'>中國小菜　龍圓</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.714488,139.792196),txt);

var txt="<img src='images/photo_yoroiya.jpg' width='219' height='144'><br><a href='yoroiya.html'>与ろゐ屋</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712807,139.796814),txt);

var txt="<img src='images/photo_takeya.jpg' width='219' height='144'><br><a href='takeya.html'>TAKEYA</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.716465,139.79403),txt);

var txt="<img src='images/photo_uosai.jpg' width='219' height='144'><br><a href='uosai.html'>魚菜</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711626,139.795224),txt);

var txt="<img src='images/photo_chiyonoya.jpg' width='219' height='144'><br><a href='chiyonoya.html'>千代乃家</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712685,139.797396),txt);

var txt="<img src='images/photo_komagata.jpg' width='219' height='144'><br><a href='komagata.html'>駒形</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.705419,139.794524),txt);

var txt="<img src='images/photo_funachu.jpg' width='219' height='144'><br><a href='funachu.html'>鮒忠　花川戸店</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712532,139.797973),txt);

var txt="<img src='images/photo_kaneso.jpg' width='219' height='144'><br><a href='kaneso.html'>かね惣</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711465,139.796243),txt);

var txt="<img src='images/photo_houkendo.jpg' width='219' height='144'><br><a href='houkendo.html'>宝研堂</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.708028,139.793885),txt);

var txt="<img src='images/photo_fujiya.jpg' width='219' height='144'><br><a href='fujiya.html'>ふじ屋</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.713077,139.797115),txt);

var txt="<img src='images/photo_bengara.jpg' width='219' height='144'><br><a href='bengara.html'>べんがら</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712656,139.79727),txt);

var txt="<img src='images/photo_yonoya.jpg' width='219' height='144'><br><a href='yonoya.html'>よのや櫛舗</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712798,139.796004),txt);

var txt="<img src='images/photo_kiryudo.jpg' width='219' height='144'><br><a href='kiryudo.html'>桐生堂</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712175,139.79704),txt);

var txt="<img src='images/photo_soushu.jpg' width='219' height='144'><br><a href='soushu.html'>宗舟</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.708378,139.793747),txt);

var txt="<img src='images/photo_bunsendo.jpg' width='219' height='144'><br><a href='bunsendo.html'>文扇堂</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711559,139.796265),txt);

var txt="<img src='images/photo_morigin.jpg' width='219' height='144'><br><a href='morigin.html'>もり銀</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712231,139.795029),txt);

var txt="<img src='images/photo_miyamoto.jpg' width='219' height='144'><br><a href='miyamoto.html'>宮本卯之助商店</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.715786,139.801636),txt);

var txt="<img src='images/photo_tokyomode.jpg' width='219' height='144'><br><a href='tokyomode.html'>東京モード</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711800,139.796707),txt);

var txt="<img src='images/photo_hashimoto.jpg' width='219' height='144'><br><a href='hashimoto.html'>三ツ福・ハシモト</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711956,139.795685),txt);

var txt="<img src='images/photo_miharu.jpg' width='219' height='144'><br><a href='miharu.html'>みはる</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711796,139.796921),txt);

var txt="<img src='images/photo_tsujiya.jpg' width='219' height='144'><br><a href='tsujiya.html'>辻屋本店</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712124,139.794678),txt);

var txt="<img src='images/photo_asanoya.jpg' width='219' height='144'><br><a href='asanoya.html'>浅乃屋</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712429,139.798630),txt);

var txt="<img src='images/photo_suzuya.jpg' width='219' height='144'><br><a href='suzuya.html'>すずや</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.714539,139.794785),txt);

var txt="<img src='images/photo_matsumoto.jpg' width='219' height='144'><br><a href='matsumoto.html'>マツモト</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711880,139.795303),txt);

var txt="<img src='images/photo_myogaya.jpg' width='219' height='144'><br><a href='myogaya.html'>めうがや</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.716389,139.795578),txt);

var txt="<img src='images/photo_megane.jpg' width='219' height='144'><br><a href='megane.html'>渡辺眼鏡商店</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711861,139.794312),txt);

var txt="<img src='images/photo_midoriya.jpg' width='219' height='144'><br><a href='midoriya.html'>ミドリ屋</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712093,139.795959),txt);

var txt="<img src='images/photo_komachi.jpg' width='219' height='144'><br><a href='komachi.html'>コマチヘア</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712269,139.794403),txt);

var txt="<img src='images/photo_kocho.jpg' width='219' height='144'><br><a href='kocho.html'>今昔きもの胡蝶（龍巳）</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712742,139.794846),txt);

var txt="<img src='images/photo_kumanoya.jpg' width='219' height='144'><br><a href='kumanoya.html'>熊野屋</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711441,139.796967),txt);

var txt="<img src='images/photo_tofu.jpg' width='219' height='144'><br><a href='tofu.html'>市川食品</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.710716,139.793564),txt);

var txt="<img src='images/photo_tokiwado.jpg' width='219' height='144'><br><a href='tokiwado.html'>常盤堂雷おこし本舗</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711056,139.796097),txt);

var txt="<img src='images/photo_kokonoe.jpg' width='219' height='144'><br><a href='kokonoe.html'>浅草九重</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.713425,139.796646),txt);

var txt="<img src='images/photo_nishimura.jpg' width='219' height='144'><br><a href='nishimura.html'>龍昇亭　西むら</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.710644,139.796692),txt);

var txt="<img src='images/photo_izumiya.jpg' width='219' height='144'><br><a href='izumiya.html'>和泉屋</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711201,139.797119),txt);

var txt="<img src='images/photo_kibidango.jpg' width='219' height='144'><br><a href='kibidango.html'>浅草きびだんご　あづま</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711491,139.796387),txt);

var txt="<img src='images/photo_omocha.jpg' width='219' height='144'><br><a href='omocha.html'>おもちゃのサワダ</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711754,139.797256),txt);

var txt="<img src='images/photo_golf.jpg' width='219' height='144'><br><a href='golf.html'>グリーンジャケット</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.706924,139.792206),txt);

var txt="<img src='images/photo_hanasuzu.jpg' width='219' height='144'><br><a href='hanasuzu.html'>花鈴</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.709763,139.794571),txt);

var txt="<img src='images/photo_neo.jpg' width='219' height='144'><br><a href='neo.html'>ネオ薬局</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712902,139.797760),txt);

var txt="<img src='images/photo_yohei.jpg' width='219' height='144'><br><a href='yohei.html'>よ兵衛</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.713394,139.796799),txt);

var txt="<img src='images/photo_matsuki.jpg' width='219' height='144'><br><a href='matsuki.html'>松喜</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.710789,139.795547),txt);

var txt="<img src='images/photo_deizi.jpg' width='219' height='144'><br><a href='deizi.html'>デイジー</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711998,139.794556),txt);

var txt="<img src='images/photo_takemoto.jpg' width='219' height='144'><br><a href='takemoto.html'>竹本容器株式会社</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711815,139.788559),txt);

var txt="<img src='images/photo_sunroute.jpg' width='219' height='144'><br><a href='sunroute.html'>ホテルサンルート浅草</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.710678,139.792007),txt);

var txt="<img src='images/photo_miyakodori.jpg' width='219' height='144'><br><a href='miyakodori.html'>都鳥</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.716721,139.797241),txt);

var txt="<img src='images/photo_muraishi.jpg' width='219' height='144'><br><a href='muraishi.html'>村石電気工事</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712299,139.796753),txt);

var txt="<img src='images/photo_sato.jpg' width='219' height='144'><br><a href='sato.html'>さとう</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.712452,139.788666),txt);

var txt="<img src='images/photo_yamada.jpg' width='219' height='144'><br><a href='yamada.html'>ヤマダの家具</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.715343,139.788849),txt);

var txt="<img src='images/photo_crown.jpg' width='219' height='144'><br><a href='crown.html'>喫茶クラウン</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711156,139.79694),txt);

var txt="<img src='images/photo_hachinoki.jpg' width='219' height='144'><br><a href='hachinoki.html'>浅草鉢の木</a>";
txt_list.push(txt);
addMarker(new GLatLng(35.711156,139.79694),txt);

}
}
	//オリジナルマーカーの画像を作成
    function originalMarker(){
	    icon = new GIcon();
	    icon.image = "http://www.asakusa.gr.jp/common/images/icon_2.gif";
	    icon.shadow = "http://www.asakusa.gr.jp/common/images/icon_shadow.png";
	    icon.iconSize = new GSize(28, 23);
	    icon.shadowSize = new GSize(28, 23);
	    icon.iconAnchor = new GPoint(0, 0);
	    icon.infoWindowAnchor = new GPoint(11, 11);
    }

function addMarker(latlng,txt){
    //マーカーを作成
    originalMarker();
    var marker = new GMarker(latlng,icon);
    marker.title=marker_index;   //ここで設定した「title属性」が

    GEvent.addListener(marker, "click", function() {
        clickMarker(marker.title);   //ここで表示される(マーカの「title属性」に表示する文字を記憶させる)
    });

    //マーカーのコンストラクタを配列に記憶
    marker_list.push(marker);
    marker_index++;

    //マーカーを地図上に配置
    map.addOverlay(marker);
}

function clickMarker(index){
    //吹き出しを表示する
    marker_list[index].openInfoWindowHtml(txt_list[index]);
}
