Skip to content

Instantly share code, notes, and snippets.

@mejackreed
Created April 3, 2018 17:04
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 mejackreed/bec44e64a18dfcb5bd89d691a2f86a55 to your computer and use it in GitHub Desktop.
Save mejackreed/bec44e64a18dfcb5bd89d691a2f86a55 to your computer and use it in GitHub Desktop.
Leaflet-IIIF Fractional Zoom Test
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://unpkg.com/leaflet-iiif@2.0.0/leaflet-iiif.js"></script>
</head>
<body>
<div id="map">
</div>
<script src="index.js"></script>
</body>
</html>
var map;
map = L.map('map', {
center: [0, 0],
crs: L.CRS.Simple,
zoom: 0,
zoomSnap: 0,
zoomDelta: 0.25
});
L.tileLayer.iiif('https://dzkimgs.l.u-tokyo.ac.jp/iiifimgs/zuzoubu/02/0002.tif/info.json').addTo(map);
html, body, #map{
height: 100%;
margin: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment