Skip to content

Instantly share code, notes, and snippets.

@yoichiro-manabe
Created January 8, 2019 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoichiro-manabe/45e1937b6055278aabbcc0b7de7a5264 to your computer and use it in GitHub Desktop.
Save yoichiro-manabe/45e1937b6055278aabbcc0b7de7a5264 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>leafletサンプル</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css" >
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
</head>
<body>
<div id="mapid" style="height: 400px; width: 600px;"></div>
<script>
var tokyoTowerLatLng = [35.6586, 139.7454];
var map = L.map('mapid').setView(tokyoTowerLatLng, 15);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> ' +
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
}).addTo(map);
L.marker(tokyoTowerLatLng).addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment