Last active
November 15, 2017 12:48
-
-
Save miguelpeixe/edc78ad54e5307bf61be84f4c84204b9 to your computer and use it in GitHub Desktop.
Medialab Prado 1km radius 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> | |
<meta charset="utf-8"> | |
<title>Liane Madrid Map</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/leaflet.css" integrity="sha256-LcmP8hlMTofQrGU6W2q3tUnDnDZ1QVraxfMkP060ekM=" crossorigin="anonymous" /> | |
<style> | |
html, body, #map { width: 100%; height: 100%; margin: 0; padding: 0; } | |
</style> | |
</head> | |
<body> | |
<div id="map"> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/leaflet.js" integrity="sha256-kdEnCVOWosn3TNsGslxB8ffuKdrZoGQdIdPwh7W1CsE=" crossorigin="anonymous"></script> | |
<script src="main.js"></script> | |
</body> | |
</html> |
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
var center = [40.410527, -3.693791]; | |
var map = L.map('map').setView(center, 14); | |
var layer = L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/rastertiles/voyager/{z}/{x}/{y}.png'); | |
var circle = L.circle(center, { | |
radius: 1000, | |
color: '#000', | |
weight: 1 | |
}); | |
map.addLayer(layer); | |
map.addLayer(circle); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment