ソースファイルを表示

sample/sample_basic.htm

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1" /> <title>Leaflet 地図を表示</title> <link rel="stylesheet" href="js/leaflet.css" /> <script src="js/leaflet.js"></script> <style type="text/css"> #map_container {     position:absolute;     top:0; left:0; right:0; bottom:0; } </style> <script type="text/javascript" charset="UTF-8"> function init() {     let map = L.map('map_container');     L.tileLayer("https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",{         attribution: "<a href='https://maps.gsi.go.jp/development/ichiran.html'"         + " target='_blank'>地理院標準地図</a>"     }).addTo(map); // 地理院地図を表示     map.setView([37,136.5], 6); // 日本を表示 } </script> </head> <body onload="init()"> <div id="map_container"></div> </body> </html>