Created
August 23, 2017 18:37
-
-
Save tnightingale/6f24d6d9163e1e792e3805151aa7ce7a 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
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | |
integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ==" | |
crossorigin=""/> | |
<style> | |
html, body { | |
margin: 0; | |
} | |
#mapid { | |
height: 100vh; | |
width: 100vw; | |
} | |
</style> | |
<!-- Make sure you put this AFTER Leaflet's CSS --> | |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" | |
integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log==" | |
crossorigin=""></script> | |
<div id="mapid"></div> | |
<script> | |
var mymap = L.map('mapid').setView([38.471, 34.189], 7); | |
L.tileLayer('https://api.mapbox.com/styles/v1/affinitybridge/{id}/tiles/256/{z}/{x}/{y}?access_token={accessToken}', { | |
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>', | |
maxZoom: 18, | |
id: 'cj6pcatou2gyv2rqsby47vlw4', | |
accessToken: 'pk.eyJ1IjoiYWZmaW5pdHlicmlkZ2UiLCJhIjoicW4wNkNXdyJ9.KyFVX7DUqVXDdSOwYnLm5Q' | |
}).addTo(mymap); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment