﻿if(GBrowserIsCompatible())
{
var point = new Array();
var nCnt = 0;
var gmarker = new Array();
var htmls = new Array();
point[0] = new GLatLng(42.919389,143.203858); htmls[0] = '<p style="font-size:12px; margin-top:5px;"><strong>ふく井ホテル</strong><br style="clear:both;" />〒080-0011 北海道帯広市西1条南11丁目 <br style="clear:both;" />http://www.fukuihotel.co.jp/</p>';
point[1] = new GLatLng(42.732212,143.212838); htmls[1] = '<p style="font-size:12px; margin-top:5px;"><strong>とかち帯広空港</strong><br>北海道帯広市泉町西9線中8番地41<br style="clear:both;" />';

point[2] = new GLatLng(35.549531,139.783604); htmls[2] = '<p style="font-size:12px; margin-top:5px;"><strong>羽田空港</strong><br>東京都大田区羽田空港3-3-2<br style="clear:both;" />';

point[3] = new GLatLng(34.859038,136.814539); htmls[3] = '<p style="font-size:12px; margin-top:5px;"><strong>中部国際空港</strong><br>愛知県常滑市セントレア一丁目１番地<br style="clear:both;" />';

point[4] = new GLatLng(42.787598,141.681399); htmls[4] = '<p style="font-size:12px; margin-top:5px;"><strong>新千歳空港</strong><br>北海道千歳市美々987番地22<br style="clear:both;" />';



function createMarker(point,htmlData)
{
var iconSet = new GIcon();
iconSet.image            = "mapimage/"+ nCnt +".png"; //アイコン画像パス
iconSet.shadow           = "mapimage/shadow.png"; //影画像パス
iconSet.iconSize         = new GSize(21, 34); //アイコンサイズ
iconSet.shadowSize       = new GSize(39, 34); //影サイズ
iconSet.iconAnchor       = new GPoint(10, 34); //アイコンの表示開始位置（0,0）は左上角から
iconSet.infoWindowAnchor = new GPoint(15, 20); //情報ウィンドウの表示開始位置
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());

//ライン（岩菅山登山ルート）
var points = [];
      points[0] = new GLatLng(42.733110,143.210490);
      points[1] = new GLatLng(42.733010,143.210120);
      points[2] = new GLatLng(42.732990,143.209620);
      points[3] = new GLatLng(42.734480,143.201850);
      points[4] = new GLatLng(42.734490,143.201280);
      points[5] = new GLatLng(42.734020,143.198240);
      points[6] = new GLatLng(42.736410,143.197480);
      points[7] = new GLatLng(42.736760,143.197220);
      points[8] = new GLatLng(42.740650,143.193760);
      points[9] = new GLatLng(42.742240,143.192440);
      points[10] = new GLatLng(42.742510,143.192350);
      points[11] = new GLatLng(42.742860,143.192310);
      points[12] = new GLatLng(42.750580,143.193670);
      points[13] = new GLatLng(42.751020,143.193670);
      points[14] = new GLatLng(42.781540,143.185900);
      points[15] = new GLatLng(42.781540,143.185900);
      points[16] = new GLatLng(42.787770,143.184310);
      points[17] = new GLatLng(42.787770,143.184310);
      points[18] = new GLatLng(42.792300,143.171950);
      points[19] = new GLatLng(42.794570,143.166170);
      points[20] = new GLatLng(42.794580,143.165940);
      points[21] = new GLatLng(42.794760,143.165470);
      points[22] = new GLatLng(42.794760,143.165470);
      points[23] = new GLatLng(42.796890,143.167110);
      points[24] = new GLatLng(42.802750,143.171480);
      points[25] = new GLatLng(42.803490,143.171870);
      points[26] = new GLatLng(42.803680,143.171940);
      points[27] = new GLatLng(42.805230,143.172210);
      points[28] = new GLatLng(42.808050,143.172610);
      points[29] = new GLatLng(42.808750,143.172810);
      points[30] = new GLatLng(42.811730,143.174780);
      points[31] = new GLatLng(42.822150,143.181910);
      points[32] = new GLatLng(42.826640,143.184800);
      points[33] = new GLatLng(42.827360,143.185420);
      points[34] = new GLatLng(42.829990,143.187250);
      points[35] = new GLatLng(42.833140,143.189420);
      points[36] = new GLatLng(42.835180,143.190730);
      points[37] = new GLatLng(42.835620,143.190880);
      points[38] = new GLatLng(42.836200,143.190950);
      points[39] = new GLatLng(42.836690,143.190910);
      points[40] = new GLatLng(42.837130,143.190810);
      points[41] = new GLatLng(42.837860,143.190460);
      points[42] = new GLatLng(42.838380,143.190000);
      points[43] = new GLatLng(42.838840,143.189450);
      points[44] = new GLatLng(42.839310,143.188630);
      points[45] = new GLatLng(42.842190,143.182200);
      points[46] = new GLatLng(42.842670,143.181370);
      points[47] = new GLatLng(42.843160,143.180910);
      points[48] = new GLatLng(42.843440,143.180700);
      points[49] = new GLatLng(42.843730,143.180560);
      points[50] = new GLatLng(42.844290,143.180390);
      points[51] = new GLatLng(42.844840,143.180420);
      points[52] = new GLatLng(42.845280,143.180540);
      points[53] = new GLatLng(42.845650,143.180720);
      points[54] = new GLatLng(42.855600,143.188750);
      points[55] = new GLatLng(42.856030,143.188980);
      points[56] = new GLatLng(42.856930,143.189270);
      points[57] = new GLatLng(42.857310,143.189310);
      points[58] = new GLatLng(42.858970,143.189240);
      points[59] = new GLatLng(42.859440,143.189290);
      points[60] = new GLatLng(42.860190,143.189520);
      points[61] = new GLatLng(42.864350,143.191650);
      points[62] = new GLatLng(42.880160,143.199940);
      points[63] = new GLatLng(42.884200,143.202000);
      points[64] = new GLatLng(42.889270,143.204670);
      points[65] = new GLatLng(42.890600,143.205420);
      points[66] = new GLatLng(42.896410,143.208390);
      points[67] = new GLatLng(42.897260,143.208570);
      points[68] = new GLatLng(42.897640,143.208550);
      points[69] = new GLatLng(42.906380,143.207460);
      points[70] = new GLatLng(42.909840,143.206980);
      points[71] = new GLatLng(42.909840,143.206980);
      points[72] = new GLatLng(42.911170,143.206760);
      points[73] = new GLatLng(42.919280,143.205720);
      points[74] = new GLatLng(42.919280,143.205720);
      points[75] = new GLatLng(42.919240,143.204880);
      points[76] = new GLatLng(42.919140,143.203880);
	  var polyline = new GPolyline(points, "#FF0000", 5);
      map.addOverlay(polyline);

//ダブルクリックズーム＆スムージング
map.enableContinuousZoom();
//初期表示の画面の中心座標
map.setCenter(new GLatLng(42.919389,143.203858), 9);
//初期フキダシ表示内容
map.openInfoWindowHtml(new GLatLng(42.919389,143.203858),'<p style="font-size:12px; margin-top:5px;"><strong>ふく井ホテル</strong><br style="clear:both;" />〒080-0011 北海道帯広市西1条南11丁目 <br style="clear:both;" />http://www.fukuihotel.co.jp/</p>');
var nDataNum = point.length;
for(nCnt=0;nCnt<nDataNum;nCnt++)
{
var marker = createMarker(point[nCnt],htmls[nCnt]);
gmarker[nCnt] = marker;
map.addOverlay(marker);
}


}