Gebruiker:Michiel1972/coords script
Van Wikipedia
<html> <head> <title>Coördinaten in het sjabloonformaat van de Nederlandstalige Wikipedia</title> <style type="text/css">
form { padding:3px; border:3px solid #DDDDDD; } td, input, select, textarea { font-size:12px; font-family:Verdana,sans-serif; } input, select, textarea { color:#0000CC; } .Bereich, .Feld { background-color:#FFFFAA; width:300px; border:3px solid #DDDDDD; } .DummyFeld { background-color:#FFFFAA; width:300px; border:0px solid #FFFFFF; } .Feld_GW { background-color:#EAFFAA; width:300px; border:3px solid #DDDDDD; } .Feld_submit { background-color:#DDFFFF; width:300px; border:3px solid #DDDDDD; } .Auswahl { background-color:#FFFFAA; width:300px; border:3px solid #DDDDDD; } .Check, .Radio { background-color:#DDFFFF; border:1px solid #DDDDDD; } .Button { background-color:#AAAAAA; color:#FFFFFF; width:200px; border:3px solid #DDDDDD; }
</style> <script type="text/javascript"> function insertGeo () { window.opener.add_geo_tag(document.formKoor2.new_submit.value); window.close(); } </script> <script type="text/javascript"> Clear_MapValues(); </script> <script type="text/javascript"> function Clear_MapValues() { var _new_lat = ""; var _new_lon = ""; var _new_latNS = ""; var _new_lonWE = ""; var _new_typ = ""; var _new_scale = ""; var _new_region = "";
var _new_labelNS =""; var _new_labelWE ="";
} </script> <script type="text/javascript"> function Get_MapValues() { _new_lat = document.formKoor1.new_lat.value; _new_lon = document.formKoor1.new_lon.value; _new_latNS = document.formKoor1.new_latNS.value; _new_lonWE = document.formKoor1.new_lonWE.value; _new_typ = document.formKoor1.new_typ.value; _new_scale = document.formKoor1.new_scale.value; _new_region = document.formKoor1.new_region.value;
_new_labelNS = document.formKoor1.new_labelNS.value; _new_labelWE = document.formKoor1.new_labelWE.value;
} </script> <script type="text/javascript"> function new_Error (Text) { alert (Text); break; { </script>
<script type="text/javascript"> function write_coor_d_M () { Get_MapValues();
if (_new_lat == "") {new_Error("breedtegraad onvolledig");} if (_new_lon == "") {new_Error("lengtegraad onvolledig");} if (_new_latNS == "") {new_Error("breedtegraad onvolledig");} if (_new_lonWE == "") {new_Error("lengtegraad onvolledig");}
$sep = "|";
if (_new_typ != "") {_new_typ = $sep+"type:"+ _new_typ; } if (_new_scale != "") {_new_scale = $sep+"zoom:"+ _new_scale; } if (_new_region != "") {_new_region = $sep+"region:"+ _new_region; }
document.formKoor2.new_submit.value = "Sjabloon:Coor d"; } </script>
<script type="text/javascript" language="javascript"> function d2dm(dec, sep) { d = parseInt(dec); r = dec - d; m = r * 60; str = d+sep+m; return str; }
function d2dms(dec, sep) { d = parseInt(dec); r = dec - d; m = parseInt(r * 60); r = (r*60)-m; s = parseInt(r * 60); str = d+sep+m+sep+s; return str; } function dm_label(dec) { d = parseInt(dec); r = dec - d;
m = parseInt(r * 60);
r = (r*60)-m; s = parseInt(30+r * 60);
m = parseInt(((m * 60)+s)/60);
str = d+"° "+m+"' "; return str; } </script>
<script type="text/javascript"> function write_coor_dm_M () { Get_MapValues();
if (_new_lat == "") {new_Error("breedtegraad onvolledig");} if (_new_lon == "") {new_Error("lengtegraad onvolledig");} if (_new_latNS == "") {new_Error("breedtegraad onvolledig");} if (_new_lonWE == "") {new_Error("lengtegraad onvolledig");}
$sep = "|";
if (_new_typ != "") {_new_typ = $sep+"type:"+ _new_typ; } if (_new_scale != "") {_new_scale = $sep+"zoom:"+ _new_scale; } if (_new_region != "") {_new_region = $sep+"region:"+ _new_region; }
document.formKoor2.new_submit.value = "[http://www.nsesoftware.nl/wiki/maps.asp?params=" +d2dm(_new_lat, $sep) +$sep +_new_latNS +$sep +d2dm(_new_lon, $sep) +$sep +_new_lonWE +_new_typ +_new_scale +_new_region +"_{{{2}}}_0_{{{3}}}_{{{4}}}_{{{5}}}_0_{{{6}}}_&src=Michiel1972/coords_script " +d2dm(_new_lat, $sep) +$sep +_new_latNS +$sep +d2dm(_new_lon, $sep) +$sep +_new_lonWE +_new_typ +_new_scale +_new_region +"°{{{2}}}′{{{3}}} {{{4}}}°{{{5}}}′{{{6}}}] "; } </script>
<script type="text/javascript"> function write_coor_dms_M () { Get_MapValues();
if (_new_lat == "") {new_Error("breedtegraad onvolledig");} if (_new_lon == "") {new_Error("lengtegraad onvolledig");} if (_new_latNS == "") {new_Error("breedtegraad onvolledig");} if (_new_lonWE == "") {new_Error("lengtegraad onvolledig");}
$sep = "|"; if (_new_typ != "") {_new_typ = "type:"+ _new_typ+"_"; } if (_new_scale != "" && _new_region =="") {_new_scale = "zoom:"+ _new_scale;
} else {_new_scale = "zoom:"+ _new_scale+"_"; }
if (_new_region != "") {_new_region = "region:"+ _new_region; }
document.formKoor2.new_submit.value = "[http://www.nsesoftware.nl/wiki/maps.asp?params=" +d2dms(_new_lat, $sep) +$sep +_new_latNS +$sep +d2dms(_new_lon, $sep) +$sep +_new_lonWE +$sep +_new_typ +_new_scale +_new_region
+"_" +dm_label(_new_lat)+_new_labelNS+", " +dm_label(_new_lon)+_new_labelWE +"_{{{3}}}_{{{4}}}_{{{5}}}_{{{6}}}_{{{7}}}_{{{8}}}_{{{9}}}&src=Michiel1972/coords_script "
+d2dms(_new_lat, $sep) +$sep +_new_latNS +$sep +d2dms(_new_lon, $sep) +$sep +_new_lonWE +$sep +_new_typ +_new_scale +_new_region
+"°" +dm_label(_new_lat)+_new_labelNS+", " +dm_label(_new_lon)+_new_labelWE +"′{{{3}}}″{{{4}}} {{{5}}}°{{{6}}}′{{{7}}}″{{{8}}}]";
} </script>
<script type="text/javascript"> function write_geo_M () { Get_MapValues(); if (_new_lat == "") {new_Error("breedtegraad onvolledig");} if (_new_lon == "") {new_Error("lengtegraad onvolledig");} if (_new_latNS == "") {new_Error("breedtegraad onvolledig");} if (_new_lonWE == "") {new_Error("lengtegraad onvolledig");}
$sep = "_";
if (_new_typ != "") {_new_typ = $sep+"type:"+ _new_typ; } if (_new_scale != "") {_new_scale = $sep+"zoom:"+ _new_scale; } if (_new_region != "") {_new_region = $sep+"region:"+ _new_region; }
document.formKoor2.new_submit.value = " [http://www.nsesoftware.nl/wiki/maps.asp?params=" +d2dms(_new_lat, $sep) +$sep +_new_latNS +$sep +d2dms(_new_lon, $sep) +$sep +_new_lonWE +_new_typ +_new_scale +_new_region
+"&src=Michiel1972/coords_script " +dm_label(_new_lat)+_new_labelNS+", " +dm_label(_new_lon)+_new_labelWE +"]";
} </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body>
<form name="formKoor1" method="post" action="geochat_load_db.php"> [bewerk] <a href="http://nl.wikipedia.org"><img src="/images/wiki.png" alt="Wiki" width="60" height="60" border="0"><tbody> </tbody> </form> <form name="formKoor2" method="post" action="geochat_load_db.php"> <textarea name="new_submit" cols="300" class="Feld_submit" id="new_submit" style="width:360px"></textarea> </form>
|
<script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAAhv-TtlumsXqbP4RZgRXS2BRjYr0wN9dNo6NO3IqbNhn69cs4uBQrjIVDFPcC9YI0fVxiHFbzMkVJOg" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[ var map = new GMap(document.getElementById("map")); //map.addControl(new GSmallMapControl()); //map.addControl(new GMapTypeControl()); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.centerAndZoom(new GPoint(5, 50), 10); GEvent.addListener(map, 'click', function(overlay, point) { if (overlay) { //map.removeOverlay(overlay); } else if (point) { map.clearOverlays(); map.addOverlay(new GMarker(point)); if (point.y < 0) { document.formKoor1.new_latNS.value = 'S'; document.formKoor1.new_labelNS.value = 'ZB'; } else { document.formKoor1.new_latNS.value = 'N'; document.formKoor1.new_labelNS.value = 'NB'; } if (point.x < 0) { document.formKoor1.new_lonWE.value = 'W'; document.formKoor1.new_labelWE.value = 'WL'; } else { document.formKoor1.new_lonWE.value = 'E'; document.formKoor1.new_labelWE.value = 'OL'; } //document.formKoor1.new_scale.value = 2000+(1000*(map.getZoomLevel()+1)*(map.getZoomLevel()+1)*(map.getZoomLevel()+1)); document.formKoor1.new_scale.value = 17-map.getZoomLevel(); if (document.formKoor1.new_scale.value<1) {document.formKoor1.new_scale.value= 1;} if (document.formKoor1.new_scale.value>17) {document.formKoor1.new_scale.value= 17;} document.formKoor1.new_lat.value = Math.abs(point.y); document.formKoor1.new_lon.value = Math.abs(point.x); document.formKoor2.new_submit.value = "Kies het gewenste uitvoerformaat door te klikken op een button"; } }); //]]> </script> |
</body> </html>