Skip to content

Instantly share code, notes, and snippets.

@stevage
Created June 12, 2016 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevage/cd4e0f7b3002a190885f23f640ef4709 to your computer and use it in GitHub Desktop.
Save stevage/cd4e0f7b3002a190885f23f640ef4709 to your computer and use it in GitHub Desktop.
Railways
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<style>
#map { height: 800px; }
</style>
<title>Old-school rail map of Victoria</title>
</head>
<body>
<div id="map"></div>
<script>
$(function() {
var map = L.map('map').setView([-37.0, 145.1], 8);
var ts=Math.round(new Date().getTime()/1000.0);
L.tileLayer('http://115.146.84.140/tile/StevePosterOldschool/{z}/{x}/{y}.png?updated='+ts, {
maxZoom: 20,
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
}).addTo(map);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment