﻿<!--
var map;

str = location.search.split("=");
switch (str[1]) {
case "1":
	lat = 31.085;
	lng = 130.479;
	zm = 8;
	break;
case "3":
	lat = 31.591;
	lng = 130.567;
	zm = 15;
	break;
case "4":
	lat = 30.432;
	lng = 130.572;
	zm = 15;
	break;
default:
	lat = 31.085;
	lng = 130.479;
	zm = 8;
	break;
}

function onLoad() {
	map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(lat , lng),zm);
	map.addControl(new GLargeMapControl());
	map.addControl(new GMapTypeControl());
	map.addControl(new GOverviewMapControl());
	map.setMapType(G_NORMAL_MAP);
	map.enableDoubleClickZoom();//ダブルクリックによるズーム機能を有効
	map.enableContinuousZoom();//マウスホイールで拡大･縮小ズーム時にアニメーション効果を有効
	
	var marker_a = null;
	var marker_b = null;
	
	var markeropts = new Object();
	marker_a = new GMarker(new GPoint(130.567,31.591), markeropts);
	map.addOverlay(marker_a);
	GEvent.addListener(marker_a, 'mouseover', function() {
	marker_a.openInfoWindow("<h2>鹿児島港・南埠頭 屋久島丸のりば</h2><p>TEL：099-224-2468</p><p><img src=images/map_thumb_minamifutoh.gif width=275 height=266></p>");
	});
	
	var markeropts = new Object();
	marker_b = new GMarker(new GPoint(130.572,30.432), markeropts);
	map.addOverlay(marker_b);
	GEvent.addListener(marker_b, 'mouseover', function() {
	marker_b.openInfoWindow("<h2>屋久島・宮之浦港 屋久島丸のりば</h2><p>TEL：0997-42-0140</p><p><img src=images/map_thumb_miyanoura.gif width=275 height=266></p>");
	});
		
	var points = [];
	points[0] = new GLatLng(31.591,130.567);
	points[1] = new GLatLng(31.590,130.575);
	points[2] = new GLatLng(31.583,130.577);
	points[3] = new GLatLng(31.562,130.586);
	points[4] = new GLatLng(31.500, 130.595);
	points[5] = new GLatLng(31.443, 130.607);
	points[6] = new GLatLng(31.390, 130.634);
	points[7] = new GLatLng(31.270, 130.712);
	points[8] = new GLatLng(31.238, 130.718);
	points[9] = new GLatLng(31.203, 130.706);
	points[10] = new GLatLng(31.175, 130.684);
	points[11] = new GLatLng(31.081, 130.608);
	points[12] = new GLatLng(31.028, 130.586);
	points[13] = new GLatLng(30.929, 130.563);
	points[14] = new GLatLng(30.703, 130.534);
	points[15] = new GLatLng(30.687, 130.535);
	points[16] = new GLatLng(30.565, 130.565);
	points[17] = new GLatLng(30.492, 130.584);
	points[18] = new GLatLng(30.466, 130.587);
	points[19] = new GLatLng(30.449, 130.587);
	points[20] = new GLatLng(30.436, 130.582);
	points[21] = new GLatLng(30.431, 130.577);
	points[22] = new GLatLng(30.432, 130.572);
	var polyline = new GPolyline(points, "#FF0000", 6);
	map.addOverlay(polyline);
	
//	GEvent.addListener(map, 'click', function(overlay, point) {
//      if (point) {
//        document.getElementById("show_x").innerHTML = point.x;
//        document.getElementById("show_y").innerHTML = point.y;
//      }
//    });
}
//-->
