Skip to content

Instantly share code, notes, and snippets.

@iamtekson
Created October 24, 2019 15:35
Show Gist options
  • Save iamtekson/2f22046b84eca2588a723d4d85fe68aa to your computer and use it in GitHub Desktop.
Save iamtekson/2f22046b84eca2588a723d4d85fe68aa to your computer and use it in GitHub Desktop.
This page will output the simple leaflet map.
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css">
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js"></script>
<style>
#map {
width: 100%;
height: 500px;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map("map").setView([38.45, 70.6], 6);
var osm = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment