﻿if(GBrowserIsCompatible())

{

var point = new Array();

var nCnt = 0;

var gmarker = new Array();

var htmls = new Array();



//マーカー表示の座標設定▼

point[0] = new GLatLng(34.179278,134.608534);htmls[0] = '<div id="mapBox"><div id="mapBox_img"><img src="img/ac_map1.jpg" /></div><div id="mapBox_name">【1】ＪＲ鳴門駅前<br /><br /><br /></div></div>';

point[1] = new GLatLng(34.178969,134.608628); htmls[1] = '<div id="mapBox"><div id="mapBox_img"><img src="img/ac_map2.jpg" /></div><div id="mapBox_name">【2】直進後左へ曲がる<br /><br /><br /></div></div>';

point[2] = new GLatLng(34.178048,134.608644); htmls[2] = '<div id="mapBox"><div id="mapBox_img"><img src="img/ac_map4.jpg" /></div><div id="mapBox_name">【3】直進<br /><br /><br /></div></div>';

point[3] = new GLatLng(34.176552,134.608566); htmls[3] = '<div id="mapBox"><div id="mapBox_img"><img src="img/ac_map5.jpg" /></div><div id="mapBox_name">【4】踏切を渡る<br /><br /><br /></div></div>';

point[4] = new GLatLng(34.17639,134.60796);htmls[4] = '<div id="mapBox"><div id="mapBox_img"><img src="img/ac_map6.jpg" /></div><div id="mapBox_name">【5】角を右へ曲がる<br /><br /><br /></div></div>';

point[5] = new GLatLng(34.1767895, 134.6075582);htmls[5] = '<div id="mapBox"><div id="mapBox_img"><img src="img/ac_map7.jpg" /></div><div id="mapBox_name">【6】ホテル・ファーストシーズン到着<br /><br /><br /></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.179278,134.608534), 16);

//初期フキダシ表示内容

//map.openInfoWindowHtml(new GLatLng(34.179278,134.608534),'<div id="mapBox"><div id="mapBox_img"><img src="img/ac_map1.jpg" /></div><div id="mapBox_name">【1】ＪＲ鳴門駅前</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);

}



}



