Skip to content

Instantly share code, notes, and snippets.

@ronnywang
Last active September 18, 2015 05:17
Show Gist options
  • Save ronnywang/065728677f1e010cc7f1 to your computer and use it in GitHub Desktop.
Save ronnywang/065728677f1e010cc7f1 to your computer and use it in GitHub Desktop.
Basic Leaftlet sample
<html>
<head>
<style>
html, body {
border: 0;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
#map {
height: 100%;
}
</style>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map"></div>
<script>
var map = new L.Map('map').setView([25.100659102852,121.51006510846], 12);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.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