Created
September 30, 2013 18:48
-
-
Save hcarreras/6768266 to your computer and use it in GitHub Desktop.
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
<%@page contentType="text/html" pageEncoding="UTF-8"%> | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<style type="text/css"> | |
html { height: 100% } | |
body { height: 100%; margin: 0; padding: 0 } | |
#map-canvas { height: 70% } | |
</style> | |
<script type="text/javascript" | |
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyArNLA2WSUUvvYBbCpxBTHjmI93VRsMdlM&sensor=true"> | |
</script> | |
<script type="text/javascript"> | |
function initialize() { | |
var mapOptions = { | |
center: new google.maps.LatLng(61.85614879566797, 24.697265625), | |
zoom: 8, | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}; | |
var map = new google.maps.Map(document.getElementById("map-canvas"), | |
mapOptions); | |
google.maps.event.addListener(map, 'click', function( event ){ | |
document.getElementById('latitude').innerHTML = event.latLng.lat(); | |
document.getElementById('longitude').innerHTML = event.latLng.lng(); | |
}); | |
} | |
google.maps.event.addDomListener(window, 'load', initialize); | |
</script> | |
</head> | |
<body> | |
<div id="map-canvas" /></div> | |
<div id="sub-menu"> | |
<div> | |
Latitude: <span id="latitude"></span> <br/> | |
Longitude: <span id="longitude"></span> | |
GDP: <span id="gdp"></span> | |
Country: <span id="country"></span> | |
<br/><br/> | |
</div> | |
</div> | |
<!-- | |
<form> | |
Latitude: <input type="text" name="latitude"><br> | |
Longitude: <input type="text" name="longitude"> | |
<input type="submit" value="getGDP"> | |
</form> | |
--> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment