From 5d26aa74ff4124ebda81ff2daca8b61aec98a175 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Fri, 7 Sep 2018 12:04:55 +0100 Subject: [PATCH] Moving leaflet examples to https --- source/_includes/head.html | 6 ++++ source/js/leaflet-examples.js | 38 ++++++++++++++++++++++++ source/showcase/leaflet-iiif-viewer.html | 6 ++-- 3 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 source/js/leaflet-examples.js diff --git a/source/_includes/head.html b/source/_includes/head.html index 581c872..59b3384 100644 --- a/source/_includes/head.html +++ b/source/_includes/head.html @@ -11,4 +11,10 @@ + {% if page.id == 'showcase-leaflet' %} + + + + + {% endif %} diff --git a/source/js/leaflet-examples.js b/source/js/leaflet-examples.js new file mode 100644 index 0000000..93a9cfc --- /dev/null +++ b/source/js/leaflet-examples.js @@ -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: 'Martin Luther King Jr. & Joan Baez march to integrate schools, Grenada, MS, 1966' +}).addTo(map); + +apostle = L.tileLayer.iiif('https://ids.lib.harvard.edu/ids/iiif/25286610/info.json', { + attribution: 'Apostle: Anonymous sculptor of Florence, 15th century (1401-1500)' +}); + +bnf = L.tileLayer.iiif('https://gallica.bnf.fr/iiif/ark:/12148/btv1b84539771/f1/info.json', { + attribution: '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: 'Acrobata Marroquí - Lorenzo Homar', + 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); diff --git a/source/showcase/leaflet-iiif-viewer.html b/source/showcase/leaflet-iiif-viewer.html index 88e5c13..86ed497 100644 --- a/source/showcase/leaflet-iiif-viewer.html +++ b/source/showcase/leaflet-iiif-viewer.html @@ -4,12 +4,12 @@ categories: [pages] layout: sub-page --- -
{% include showcase_return.html %} - - +
+
+ {% assign id = "leaflet" %} {% include sub-showcase_md.html %}