Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
Moving leaflet examples to https
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson committed Sep 7, 2018
1 parent cd703e1 commit 5d26aa7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
6 changes: 6 additions & 0 deletions source/_includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@
<link rel="stylesheet" href="/css/main.css">
<link type="application/atom+xml" rel="self" href="{{ page.webprefix }}/news/atom.xml"/>
<script src="/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
{% if page.id == 'showcase-leaflet' %}
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://mejackreed.github.io/Leaflet-IIIF/leaflet-iiif.js"> </script>
{% endif %}
</head>
38 changes: 38 additions & 0 deletions source/js/leaflet-examples.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var map, stanfordMlk, apostle, princetonMap, bnf, iiifLayers, scottlandBagpipe;

map = L.map('map', {
center: [0, 0],
crs: L.CRS.Simple,
zoom: 0
});

stanfordMlk = L.tileLayer.iiif('https://stacks.stanford.edu/image/iiif/hg676jb4964%2F0380_796-44/info.json', {
attribution: '<a href="http://searchworks.stanford.edu/view/hg676jb4964">Martin Luther King Jr. & Joan Baez march to integrate schools, Grenada, MS, 1966</a>'
}).addTo(map);

apostle = L.tileLayer.iiif('https://ids.lib.harvard.edu/ids/iiif/25286610/info.json', {
attribution: '<a href="http://via.lib.harvard.edu/via/deliver/deepcontentItem?recordId=olvwork576793%2CVIT.BB%3A4906794">Apostle: Anonymous sculptor of Florence, 15th century (1401-1500)</a>'
});

bnf = L.tileLayer.iiif('https://gallica.bnf.fr/iiif/ark:/12148/btv1b84539771/f1/info.json', {
attribution: '<a href="http://gallicalabs.bnf.fr/ark:/12148/btv1b84539771">ManuscritKalîla et Dimna, avec de nombreuses',
fitBounds: false
});

acrobata = L.tileLayer.iiif('https://libimages.princeton.edu/loris2/pudl0033/2007/04003/00000001.jp2/info.json', {
attribution: '<a href="http://pudl.princeton.edu/objects/pz50gw22j">Acrobata Marroquí - Lorenzo Homar</a>',
quality: 'gray'
});

scottlandBagpipe = L.tileLayer.iiif('https://images.is.ed.ac.uk/luna/servlet/iiif/UoEwmm~2~2~77099~164515/info.json');

iiifLayers = {
'Martin Luther King Jr. & Joan Baez ...': stanfordMlk,
'The provinces of New York and N...': princetonMap,
'Apostle: Anonymous sculptor of Fl...': apostle,
'ManuscritKalîla et Dimna, avec de...': bnf,
'Acrobata Marroquí': acrobata,
'A Compleat Theory of the Scots Highland Bagpipe': scottlandBagpipe
};

//L.control.layers(iiifLayers).addTo(map);
6 changes: 3 additions & 3 deletions source/showcase/leaflet-iiif-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
categories: [pages]
layout: sub-page
---

<section class="showcase showcase-item wrapper">
{% include showcase_return.html %}

<iframe src="https://mejackreed.github.io/Leaflet-IIIF/examples/example.html" frameborder="0"></iframe>

<div id="map" style="width: 100%; height: 500px;">
</div>
<script src="/js/leaflet-examples.js"></script>
{% assign id = "leaflet" %}
{% include sub-showcase_md.html %}
</section>

0 comments on commit 5d26aa7

Please sign in to comment.