Skip to content

Instantly share code, notes, and snippets.

@LouisaKB
Created November 8, 2016 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LouisaKB/380d7c63efdfbfbd11049bca97c18fe9 to your computer and use it in GitHub Desktop.
Save LouisaKB/380d7c63efdfbfbd11049bca97c18fe9 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
// Coordinates of the Big Ben tower in London. This will be our starting point.
var origin = [51.50072919999999, -0.12462540000001354];
var osmUrl="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
var osmTileLayer = L.tileLayer(osmUrl);
var markerLayer = L.layerGroup();
var leafletMap = L.map('map').addLayer(osmTileLayer).addLayer(markerLayer).setView(origin, 10);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment