Skip to content

Instantly share code, notes, and snippets.

@tyrasd
Created December 15, 2013 14:38
Show Gist options
  • Save tyrasd/7973750 to your computer and use it in GitHub Desktop.
Save tyrasd/7973750 to your computer and use it in GitHub Desktop.
Bahnlinie Meran Bozen
<!DOCTYPE html>
<html>
<head>
<title>Leaflet example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--leaflet-->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.js?2"></script>
</head>
<body>
<div id="map" style="width: 1000px; height: 900px"></div>
<script>
var map = L.map('map').setView([46.5, 11.5], 11);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="osm.org">OpenStreetMap</a> contributors'
}).addTo(map);
L.tileLayer('http://a.tiles.mapbox.com/v3/tyr.mebo_bahn/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="osm.org">OpenStreetMap</a> contributors'
}).addTo(map);
map.on('click', function(e) { alert(e.latlng); });
L.marker([51.5, -0.09]).on("click", function(e) { alert(e.latlng); }).addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment