Last active
September 23, 2016 08:43
-
-
Save oscarfonts/202f7a3a06a9ccdcd0b81506a8c87b30 to your computer and use it in GitHub Desktop.
Barcelona Airport T1 - Floor plants
This file contains hidden or 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>Barcelona Airport T1 - Floor plants</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" /> | |
<style type="text/css"> | |
html, body, #map { | |
margin: 0; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script> | |
<script> | |
var layers = { | |
"Floor 3 - Check in, Departures (level 2 in OSM)": "http://mapwarper.net/maps/tile/15761/{z}/{x}/{y}.png", | |
"Floor 1 - La Plaza, Arrivals (level 1 in OSM)": "http://mapwarper.net/maps/tile/15760/{z}/{x}/{y}.png", | |
"Floor 0 - Intermodal: Bus, Taxi, Metro (ground level in OSM)": "http://mapwarper.net/maps/tile/15758/{z}/{x}/{y}.png" | |
}; | |
for(name in layers) { | |
layers[name] = L.tileLayer(layers[name], { | |
maxZoom: 19, | |
bounds: [ | |
[41.24712051859019, 1.8959314626397201], | |
[41.53442029978945, 2.3140591893595457] | |
], | |
attribution: 'Data: <a href="http://www.aena.es/csee/Satellite?Language=ES_ES&ca=BCN&pagename=cartografia&ps=t">AENA</a>, Tiles: <a href="http://mapwarper.net/users/4627">Map Warper</a>', | |
errorTileUrl: "http://placehold.it/256?text=🐉" | |
}); | |
} | |
var map = L.map('map', { | |
center: [41.2882, 2.0739], | |
zoom: 16 | |
}); | |
for (var first in layers) { | |
layers[first].addTo(map); | |
break; | |
} | |
L.control.layers(layers).addTo(map); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment