Last active
January 2, 2016 19:28
-
-
Save peterdesmet/8350285 to your computer and use it in GitHub Desktop.
LatLong Crosshairs for Google Maps by Pierre Bélisle and Peter Desmet for Canadensys. http://www.canadensys.net/latlong-crosshairs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var coord;var output;var xhs;if(!document.getElementById('xhs')){xhs=document.createElement('div');xhs.setAttribute('id','xhs');xhs.setAttribute('style', 'background:url(\'http://www.canadensys.net/crosshair.png\') top left no-repeat;position:absolute;top:50%;left:50%;margin-top:-7px;margin-left:-7px;height:15px;width:15px;');xhs.onclick=function(){coord = [gApplication.getMap().getCenter().lat(),gApplication.getMap().getCenter().lng()];output = Math.round(coord[0]*10000000)/10000000 + '\t' + Math.round(coord[1]*10000000)/10000000;prompt('Latitude and Longitude',output);};void(document.getElementById('map').appendChild(xhs));}else{void(document.getElementById('map').removeChild(xhs));} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment