Created
January 8, 2019 00:42
-
-
Save yoichiro-manabe/45e1937b6055278aabbcc0b7de7a5264 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
<!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 © <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