3.0.0 • Published 5 years ago

leaflet-iiif v3.0.0

Weekly downloads
99
License
MIT
Repository
github
Last release
5 years ago

Leaflet-IIIF

A Leaflet plugin for viewing IIIF images. See the demo

Requires Leaflet.js.

Leaflet-IIIF relies on browser support for Promise and Fetch API. If you need to support IE or other browsers without this, please use a polyfill.

Note on Leaflet Compatibility

Leaflet VersionsLeaflet-IIIF Versions
< 1.0.0< 1.0.0
>= 1.0>= 1.0

Examples

Install with NPM

$ npm install leaflet-iiif --save

Quick and easy to get going.

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

L.tileLayer.iiif('http://example.com/iiifimage.jp2/info.json').addTo(map);

Thanks to klokantech/iiifviewer and turban/Leaflet.Zoomify who have similar plugins which were used in development of Leaflet-IIIF.

Options

Leaflet-IIIF extends L.TileLayer and so many options available to L.TileLayer can be used with Leaflet-IIIF.

OptionTypeDefaultDescription
tileFormatString'jpg'The format of the returned image.
tileSizeNumber256Tile size (width and height in pixels, assuming tiles are square).
fitBoundsBooleantrueAutomatically center and fit the maps bounds to the added IIIF layer
setMaxBoundsBooleanfalseConstrain the map viewer to the image
qualityString'default'determines whether the image is delivered in color, grayscale or black and white Note: All IIIF servers do not support this parameter.

Development

Clone the repository

$ git clone https://github.com/mejackreed/Leaflet-IIIF.git

Install the dependencies

$ npm install

Run the server

$ npm start

Run the test suite

$ npm test

Access the examples at http://127.0.0.1:8080/examples/example.html

Leaflet-IIIF Examples

Leaflet-IIIF in the wild

3.0.0

5 years ago

0.2.1

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.2.0

8 years ago

0.0.8

9 years ago