Last active
October 16, 2018 20:32
-
-
Save bnorberg/d0a4f8634a8d33a428d49cb6dc2068ff 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
<html> | |
<head> | |
<style> | |
#mapid { height: 680px; } | |
</style> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" | |
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" | |
crossorigin=""/> | |
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js" | |
integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==" | |
crossorigin=""></script> | |
</head> | |
<body> | |
<div id="mapid"></div> | |
<script type="text/javascript"> | |
var mymap = L.map('mapid').setView([36.0014258, -78.9382286], 16); | |
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { | |
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>', | |
maxZoom: 18, | |
id: 'mapbox.streets', | |
accessToken: 'ADD YOUR PUBLIC KEY HERE' | |
}).addTo(mymap); | |
var marker = L.marker([36.00357775, -78.9387302545133]).addTo(mymap); | |
marker.bindPopup("<b>Here we are!</b><br>In a popup.").openPopup(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment