//googlemapの表示とはじめに表示される位置、マーカー情報ウインドウの設定
var map;
function load() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		map.addControl(new GMapTypeControl());
		map.addControl(new GLargeMapControl());
		map.addControl(new GScaleControl());
		map.addControl(new GOverviewMapControl(new GSize(150, 120)));
		map.setCenter(new GLatLng(33.22892377275307, 131.76761627197266), 11);

//marker-Fujisawa
	var icon01 = new GIcon();
	icon01.image = "green-dot.png";
	icon01.shadow = "shadow.png";
	icon01.iconSize = new GSize(32, 32);
	icon01.shadowSize = new GSize(37, 34);
	icon01.iconAnchor = new GPoint(16, 32);
	icon01.infoWindowAnchor = new GPoint(16, 2);

//marker-bus
	var icon02 = new GIcon();
	icon02.image = "yellow-dot.png";
	icon02.shadow = "shadow.png";
	icon02.iconSize = new GSize(32, 32);
	icon02.shadowSize = new GSize(37, 34);
	icon02.iconAnchor = new GPoint(16, 32);
	icon02.infoWindowAnchor = new GPoint(16, 2);

//marker-train
	var icon03 = new GIcon();
	icon03.image = "blue-dot.png";
	icon03.shadow = "shadow.png";
	icon03.iconSize = new GSize(32, 32);
	icon03.shadowSize = new GSize(37, 34);
	icon03.iconAnchor = new GPoint(16, 32);
	icon03.infoWindowAnchor = new GPoint(16, 2);

//marker-car
	var icon04 = new GIcon();
	icon04.image = "red-dot.png";
	icon04.shadow = "shadow.png";
	icon04.iconSize = new GSize(32, 32);
	icon04.shadowSize = new GSize(37, 34);
	icon04.iconAnchor = new GPoint(16, 32);
	icon04.infoWindowAnchor = new GPoint(16, 2);

//マーカーを表示
	map.addOverlay(mark_01 = new GMarker(new GLatLng(33.23824333629793, 131.76541686058044),icon01));//本社
	map.addOverlay(mark_04 = new GMarker(new GLatLng(33.238375696560716, 131.76485627889633),icon02));//バス停_A
	map.addOverlay(mark_05 = new GMarker(new GLatLng(33.238283717416294, 131.76492869853973),icon02));//バス停_B
	map.addOverlay(mark_03 = new GMarker(new GLatLng(33.23619284832553, 131.75201654434204),icon03));//JR
	map.addOverlay(mark_02 = new GMarker(new GLatLng(33.19572962686578, 131.701762676239)));//car

//ポリライン表示
//bus line
	var point1 = new GLatLng(33.23837793995328, 131.76485359668732);
	var point2 = new GLatLng(33.23829044760088, 131.76489651203156);
	var point3 = new GLatLng(33.23830839475723, 131.76527738571167);
	var point4 = new GLatLng(33.238182764585424, 131.76528811454773);
	var point5 = new GLatLng(33.23818725138038, 131.76541954278946);

	var points = [];
	points.push(point1);
	points.push(point2);
	points.push(point3);
	points.push(point4);
	points.push(point5);

	map.addOverlay(new GPolyline(points, "#ffff00", "5", "0.6"));

//train line
	var point6 = new GLatLng(33.23641719289728, 131.75201654434204);
	var point7 = new GLatLng(33.23640821912545, 131.75404965877533);
	var point8 = new GLatLng(33.23645308797533, 131.75439298152924);
	var point9 = new GLatLng(33.23700497294552, 131.75439834594727);
	var point10 = new GLatLng(33.23704086778228, 131.75467193126678);
	var point11 = new GLatLng(33.23696010437884, 131.75468266010284);
	var point12 = new GLatLng(33.23829717778494, 131.76482677459717);
	var point13 = new GLatLng(33.238315124939895, 131.7652827501297);
	var point14 = new GLatLng(33.23817379099481, 131.76529079675674);
	var point15 = new GLatLng(33.23817603439254, 131.76541686058044);

	var points2 = [];
	points2.push(point6);
	points2.push(point7);
	points2.push(point8);
	points2.push(point9);
	points2.push(point10);
	points2.push(point11);
	points2.push(point12);
	points2.push(point13);
	points2.push(point14);
	points2.push(point15);

	map.addOverlay(new GPolyline(points2, "#0000ff", "5", "0.6"));
	
	//car line
	var point16 = new GLatLng(33.19646,131.70255);
	var point17 = new GLatLng(33.19833,131.70770);
	var point18 = new GLatLng(33.20020,131.71113);
	var point19 = new GLatLng(33.20321,131.71371);
	var point20 = new GLatLng(33.20580,131.71457);
	var point21 = new GLatLng(33.20795,131.71543);
	var point22 = new GLatLng(33.20896,131.71697);
	var point23 = new GLatLng(33.21097,131.72023);
	var point24 = new GLatLng(33.21327,131.72933);
	var point25 = new GLatLng(33.21485,131.72882);
	var point26 = new GLatLng(33.21470,131.73139);
	var point27 = new GLatLng(33.21571,131.73517);
	var point28 = new GLatLng(33.21729,131.73620);
	var point29 = new GLatLng(33.21858,131.74135);
	var point30 = new GLatLng(33.22002,131.74238);
	var point31 = new GLatLng(33.22289,131.74152);
	var point32 = new GLatLng(33.22447,131.74564);
	var point33 = new GLatLng(33.22676,131.74427);
	var point34 = new GLatLng(33.22878,131.74839);
	var point35 = new GLatLng(33.23093,131.75096);
	var point36 = new GLatLng(33.23337,131.75199);
	var point37 = new GLatLng(33.23538,131.75182);
	var point38 = new GLatLng(33.23516,131.76087);
	var point39 = new GLatLng(33.23599,131.76409);
	var point40 = new GLatLng(33.23825,131.76403);
	var point41 = new GLatLng(33.23834,131.76523);
	var point42 = new GLatLng(33.23822,131.76523);

	var points3 = [];

	points3.push(point17);
	points3.push(point18);
	points3.push(point19);
	points3.push(point20);
	points3.push(point21);
	points3.push(point22);
	points3.push(point23);
	points3.push(point24);
	points3.push(point25);
	points3.push(point26);
	points3.push(point27);
	points3.push(point28);
	points3.push(point29);
	points3.push(point30);
	points3.push(point31);
	points3.push(point32);
	points3.push(point33);
	points3.push(point34);
	points3.push(point35);
	points3.push(point36);
	points3.push(point37);
	points3.push(point38);
	points3.push(point39);
	points3.push(point40);
	points3.push(point41);
	points3.push(point42);

	map.addOverlay(new GPolyline(points3, "#ff0000", "5", "0.6"));

//情報ウィンドウを表示
	mark_01.openInfoWindowHtml('<p><b>藤澤環境開発株式会社　本社</b><br /><img src="../../img/tes.jpg" width="120" height="120" border="0" alt="藤澤環境開発株式会社　本社" /></p><p style=\"text-align:left; font-size:10px;\">〒870-0325<br />大分市久原中央四丁目7番1号<br />TEL:097-593-4211<br />FAX:097-593-0094</p>');
  }
}
