Created
September 24, 2012 02:16
-
-
Save bsudekum/3773851 to your computer and use it in GitHub Desktop.
Hypem Map
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet Quick Start Guide Example</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.ie.css" /> | |
<![endif]--> | |
<script src="http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.js"></script> | |
</head> | |
<body> | |
<div id="map" style="width: 100%; height: 600px"></div> | |
<script> | |
var map = L.map('map').setView([-55.17887, -43.94531], 2); | |
L.tileLayer('http://static-ak.hypem.net/images/zeitgeist2011/map_05/{z}/{x}/{y}.png', { | |
maxZoom: 7, | |
attribution: 'Hypem', | |
tms: true | |
}).addTo(map); | |
var popup = L.popup(); | |
function onMapClick(e) { | |
popup | |
.setLatLng(e.latlng) | |
.setContent("You clicked the map at " + e.latlng.toString()) | |
.openOn(map); | |
} | |
map.on('click', onMapClick); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment