Commit e0fdf8e4 authored by Michael Murtaugh's avatar Michael Murtaugh

example of simple map

parent 5ddd65a7
......@@ -3,10 +3,10 @@
<head>
<title>ST01</title>
<meta charset="utf-8">
<script src="../lib/leaflet/leaflet.js"></script>
<link href="../lib/leaflet/leaflet.css" rel="stylesheet" type="text/css">
<script src="../lib/leaflet-hash/leaflet-hash.js"></script>
<script src="../lib/leafygal.js"></script>
<script src="/lib/leaflet/leaflet.js"></script>
<link href="/lib/leaflet/leaflet.css" rel="stylesheet" type="text/css">
<script src="/lib/leaflet-hash/leaflet-hash.js"></script>
<script src="/lib/leafygal/dist/leafygal.js"></script>
<style>
div.leaflet-tile {
color: white;
......@@ -35,8 +35,22 @@ div.leaflet-control-attribution {
<div id="map" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; background: #C7C7C7"></div>
<script src="map.js"></script>
<script type="text/javascript">
var abovepages = [1751];
init_map(9, abovepages);
var map = L.map('map', {
maxZoom: max_zoom || 9,
minZoom: 0,
zoom: 0,
crs: L.CRS.Simple,
center: new L.LatLng(0,0)
});
console.log("adding map layer", L);
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 0, maxZoom: 20, attribution: osmAttrib});
// map.addLayer(osm);
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment