﻿if(GBrowserIsCompatible())

{

var point = new Array();

var nCnt = 0;

var gmarker = new Array();

var htmls = new Array();



//マーカー表示の座標設定▼

//ホテル ファーストシーズン

point[0] = new GLatLng(34.1767895, 134.6075582);htmls[0] = '<div id="mapBox"><div id="mapBox_img"><img src="img/map0.jpg" alt="ホテル ファーストシーズン" /></div><div id="mapBox_name">ﾎﾃﾙ ﾌｧｰｽﾄｼｰｽﾞﾝ</div><div id="mapBox_txt">徳島県鳴門市撫養町斎田字大堤228<br />TEL:088-686-3261‎</div></div>';


//渦の道

point[1] = new GLatLng(34.23788288646138, 134.64790105819702); htmls[1] = '<div id="mapBox"><div id="mapBox_img"><img src="img/map1.gif" alt="渦の道" /></div><div id="mapBox_name">渦の道</div><div id="mapBox_txt">TEL:088-683-6262<br /></div><div id="mapBox_btn"><a href="#a"><img src="img/hp.gif" alt="詳細" /></a><div></div>';


//大塚国際美術館

point[2] = new GLatLng(34.232476, 134.637728); htmls[2] = '<div id="mapBox"><div id="mapBox_img"><img src="img/map2.gif" alt="大塚国際美術館" /></div><div id="mapBox_name">大塚国際美術館</div><div id="mapBox_txt">TEL:088-687-3737‎</div><div id="mapBox_btn"><a href="#b"><img src="img/hp.gif" alt="詳細" /></a><div></div>';


//霊山寺
point[3] = new GLatLng(34.1594833126155, 134.5032173395157); htmls[3] = '<div id="mapBox"><div id="mapBox_img"><img src="img/map3.gif" alt="霊山寺" /></div><div id="mapBox_name">霊山寺</div><div id="mapBox_txt">TEL:088-689-1111</div><div id="mapBox_btn"><a href="#c"><img src="img/hp.gif" alt="詳細" /></a><div></div>';


//鳴門ドイツ館
point[4] = new GLatLng(34.16469002524883, 134.4990599155426); htmls[4] = '<div id="mapBox"><div id="mapBox_img"><img src="img/map4.gif" alt="鳴門ドイツ館" /></div><div id="mapBox_name">鳴門ドイツ館</div><div id="mapBox_txt">TEL:088-689-0099</div><div id="mapBox_btn"><a href="#d"><img src="img/hp.gif" alt="詳細" /></a><div></div>';


//マーカー表示のHTML▲



function createMarker(point,htmlData)

{

var iconSet = new GIcon();

iconSet.image            = "img/"+ nCnt +".png"; //アイコン画像パス

iconSet.shadow           = "img/shadow.png"; //影画像パス

iconSet.iconSize         = new GSize(32, 32); //アイコンサイズ

iconSet.shadowSize       = new GSize(37, 34); //影サイズ

iconSet.iconAnchor       = new GPoint(10, 34); //アイコンの表示開始位置（0,0）は左上角から

iconSet.infoWindowAnchor = new GPoint(15, 3); //情報ウィンドウの表示開始位置

iconSet.infoShadowAnchor = new GPoint(15, 20); //情報ウィンドウの影の表示開始位置

var marker = new GMarker(point,iconSet);

GEvent.addListener(marker, 'click', function(){

marker.openInfoWindowHtml(htmlData);

});

return marker;

}

function myclick(HtmlCnt) {

gmarker[HtmlCnt].openInfoWindowHtml(htmls[HtmlCnt]);

}

var map = new GMap2(document.getElementById("map"));

//操作バー（左）

map.addControl(new GLargeMapControl());

//表示切替（上）

//map.addControl(new GMapTypeControl());

//ダブルクリックズーム＆スムージング

map.enableContinuousZoom();

//初期表示の画面の中心座標

map.setCenter(new GLatLng(34.208395098932854, 134.549560546875), 12);

//初期フキダシ表示内容

map.openInfoWindowHtml(new GLatLng(34.1767895, 134.6075582),'<div id="mapBox"><div id="mapBox_img"><img src="img/map0.jpg" alt="ホテル ファーストシーズン" /></div><div id="mapBox_name">ﾎﾃﾙ ﾌｧｰｽﾄｼｰｽﾞﾝ</div><div id="mapBox_txt">徳島県鳴門市撫養町斎田字大堤228<br />TEL:088-686-3261‎</div></div>');

var nDataNum = point.length;

for(nCnt=0;nCnt<nDataNum;nCnt++)

{

var marker = createMarker(point[nCnt],htmls[nCnt]);

gmarker[nCnt] = marker;

map.addOverlay(marker);

}



}




