function ow(lng, lat ,xname ,zoom) { document.getElementById("xx").innerHTML = xxx; document.getElementById("xx").style.display = "block"; div = document.getElementById("xx"); document.f.x.value = lng; document.f.y.value = lat; document.f.xn.value = xname; document.f.zoom.value = zoom; document.g.q.value = xname; return false; } var xxx = '' + '' + ''+ '
' + ''+ '
'+ '
'+ ''+ ''+ ''+ ''+ ''+ '
'+ '
'+ ''+ '
'+ '別の地図で表示: '+ '    '+ '' + '' + '' + '' + '
'+ '
'; function xc() { var i = document.f.xs.selectedIndex; if ( i == 1 ) { // マピオン Mapion(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } else if ( i == 2 ) { // 国土地理院 Watchizu(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } else if ( i == 3 ) { // ちず丸 Chizumaru(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } else if ( i == 4 ) { // GoogleMap GoogleMap(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } else if ( i == 5 ) { // Yahoo Yahoo(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } else if ( i == 6 ) { // Goo Goo(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } else if ( i == 7 ) { // ドコイク?地図 Dokoiku(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } else if ( i == 8 ) { // mapple Mapple(parseFloat(document.f.x.value), parseFloat(document.f.y.value), document.f.xn.value, document.f.zoom.value); } } function Mapion(yy, xx, xn, zoom){ center = convCoordinateWGS84ToTokyo(xx, yy); var url = "http://www.mapion.co.jp/c/f?uc=1&scl=25000&grp=route" url += "&el=" + (center.x + "" ).substring(0, 10); url += "&nl=" + (center.y + "" ).substring(0, 9); //共通リンク処理にてリンクする window.open(url, "_blank"); } function Watchizu(yy, xx, xn, zoom){ var base60_point = convBase10ToBase60( xx , yy ); var url = "http://watchizu.gsi.go.jp/watchizu.html" url += "?l=" + base60_point.lng.substring(1, 10).replace(".", "").replace(".", "") + "." + base60_point.lng.substring(11, 12); url += "&b=" + base60_point.lat.substring(1, 9).replace(".", "").replace(".", "") + "." + base60_point.lat.substring(10, 11); //共通リンク処理にてリンクする window.open(url, "_blank"); } function Chizumaru(yy, xx, xn, zoom){ center = convCoordinateWGS84ToTokyo(xx, yy); var url = "http://www.chizumaru.com/maplink.asp?SER=all&D=all&SCL=330" url += "&X=" + (center.x * 60 * 60 ); url += "&Y=" + (center.y * 60 * 60 ); //共通リンク処理にてリンクする window.open(url, "_blank"); } function GoogleMap(yy, xx, xn, zoom){ //リンクの引数 var url = "http://maps.google.co.jp/maps"; url += "?ll=" + String( yy ) + "," + String( xx ); url += "&z=" + zoom; //共通リンク処理にてリンクする window.open(url, "_blank"); } function Yahoo(yy, xx, xn, zoom){ center = convCoordinateWGS84ToTokyo( xx, yy ); var base60_point = convBase10ToBase60( center.x , center.y ); var zoom_table = [ 10 , 10 , 10 , 10 , 10 , 10 , 10 , 9 , 9 , 8 , 7 , 6 , 5 , 5 , 4 , 4 , 3 , 2 , 1 , 1 , 1 , 1 ]; //尺度対応テーブル //リンクの引数 var url = "http://map.yahoo.co.jp/pl"; url += "?el=" + base60_point.lng.substring( 0 , 14 ); url += "&nl=" + base60_point.lat.substring( 0 , 13 ); url += "&sc=" + zoom_table[ zoom ]; //共通リンク処理にてリンクする window.open(url, "_blank"); } function Goo(yy, xx, xn, zoom){ center = convCoordinateWGS84ToTokyo( xx, yy ); var base60_point = convBase10ToBase60( center.x , center.y ); var zoom_table = [ 10 , 9 , 8 , 7 , 7 , 6 , 5 , 4 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 ]; //尺度対応テーブル //リンクの引数 var url = "http://map.goo.ne.jp/map.php"; url += "?MAP=" + "E" + base60_point.lng.substring( 1 , 14 ) + "N" + base60_point.lat.substring( 1 , 13 ); url += "&AM=" + zoom_table[ zoom ]; //共通リンク処理にてリンクする window.open(url, "_blank"); } function Dokoiku(yy, xx, xn, zoom){ var url = "http://map.doko.jp/m"; url += "/" + Math.floor(xx * 60 * 60 * 1000); url += "/" + Math.floor(yy * 60 * 60 * 1000); url += "/" + zoom; //共通リンク処理にてリンクする window.open(url, "_blank"); } function Mapple(yy, xx, xn, zoom){ center = convCoordinateWGS84ToTokyo( xx, yy ); //リンクの引数 var url = "http://map.mapple.net/_sc10000"; url += "_lon" + center.x; url += "_lat" + center.y; url += ".htm"; //共通リンク処理にてリンクする window.open(url, "_blank"); } function convCoordinateWGS84ToTokyo(x , y){ var result = {}; result.y = y + 0.00010696 * y - 0.000017467 * x - 0.0046020; result.x = x + 0.000046047 * y + 0.000083049 * x - 0.010041; return result; } function convBase10ToBase60( base10 ){ base10 = parseFloat( base10 ); var minus = 0; if( base10 < 0 ){ base10 *= -1 ; minus = 1; } var base60_1 = Math.floor( base10 ); base10 = ( base10 - base60_1 ) * 60; var base60_2 = Math.floor( base10 ); base10 = ( base10 - base60_2 ) * 60; var base60_3 = base10; var result = ( !minus ? "+" : "-" ) + String( base60_1 ) + "." + ( base60_2 < 10 ? "0" : "" ) + String( base60_2 ) + "." + ( base60_3 < 10 ? "0" : "" ) + String( base60_3 ); if( arguments[ 1 ] ){ var result_obj = {}; result_obj.lng = result; result_obj.lat = convBase10ToBase60( arguments[ 1 ] ); return result_obj; } else { return result; } }