Skip to content

Instantly share code, notes, and snippets.

@oilking143
Created December 24, 2018 02:57
Show Gist options
  • Save oilking143/103a6f7f5a297498009e943c3e59c0a6 to your computer and use it in GitHub Desktop.
Save oilking143/103a6f7f5a297498009e943c3e59c0a6 to your computer and use it in GitHub Desktop.
為了分享OSM寫的,順便練習用用看GIST
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" crossorigin=""/>
<style>
html, body{
width: 100%;
height: 100%;
}
#map{
width: 100%;
height: 100%;
}
</style>
<div id="map"></div>
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js" integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==" crossorigin=""></script>
<script>
var map;
map = L.map('map').setView([25.0644350, 121.5334914], 5);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '<a href="https://www.openstreetmap.org/">OSM</a>',
maxZoom: 18,
}).addTo(map);
var marker = L.marker([25.0644350, 121.5334914]);
marker.addTo(map);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment