Commit Graph
46 Commits
Author SHA1 Message Date
Lutz Helm 018a7e2753 Remove superfluous comma 2019-07-02 13:50:29 +02:00
Lutz Helm 3cc18b6ea1 Test full region zoom levels with IIIF Image API v3 tile source 2019-07-02 13:39:23 +02:00
Lutz Helm 0507132a21 Correct and test IIIF version 3 image info parser 2019-07-02 13:21:09 +02:00
Lutz Helm 7147dce4d0 Remove unused code in IIIFInfo parser 2019-07-02 09:52:08 +02:00
Lutz Helm cc976dd4ad Adjust IIIF info parsing to 3.0-beta spec
- respect `preferredFormats`
- correct compliance level profile formats and features
2019-07-01 17:51:52 +02:00
Lutz Helm d6dc7a926d Fix several TypeScript type check problems 2019-06-21 15:26:28 +02:00
Lutz Helm 1d08eb5752 Give a hint on how to parse IIIF info.json 2019-05-13 12:27:14 +02:00
Lutz Helm 5e288ebedf Improve IIIF tile source doc 2019-05-13 11:15:20 +02:00
Lutz Helm 80eb8b62ce Display union types in IIIFInfo constructor doc 2019-05-13 11:14:43 +02:00
Lutz Helm cdb36a3bf2 Expose IIIFInfo methods for doc 2019-05-13 11:04:28 +02:00
Lutz Helm 04a28854c9 Make IIIFInfo#Versions appear in doc
For whatever reasons, the possible values of `Versions` did not appear
in the built docs.
2019-05-13 10:49:38 +02:00
Lutz Helm 7daba05548 Use quoted strings for accessing IIIF_PROFILE_VALUES 2019-05-09 18:00:18 +02:00
Lutz Helm 64e67ae351 Correct IIIF tile source doc 2019-05-09 18:00:18 +02:00
Lutz Helm 40ea2a8b7e Remove extent definition from IIIF example
See
https://github.com/openlayers/openlayers/pull/9430#pullrequestreview-232616993
2019-05-09 18:00:18 +02:00
Lutz Helm 4629fe5028 Add @api annotation for TileGrid#getExtent 2019-05-09 18:00:18 +02:00
Lutz Helm ba2c558b72 Add typedefs for IIIF info.json responses 2019-05-09 18:00:18 +02:00
Lutz Helm 84f1e0c66e Avoid minification/compilation errors in IIIFInfo
Unquoted properties might be renamed, resulting in errors while
accessing these properties via intented string values.
See also:
https://github.com/openlayers/openlayers/pull/9430#pullrequestreview-232622522
https://github.com/openlayers/openlayers/pull/9430#pullrequestreview-232622575
2019-05-09 18:00:18 +02:00
Lutz Helm 72e41d3703 Remove attribution generation from IIIFInfo
Generating attributions by injecting 3rd party HTML content introduces
XSS vulnerabilities, so with regard to upcoming Image API changes this
functionality is removed.
See also
https://github.com/openlayers/openlayers/pull/9430#issuecomment-482610729
2019-05-09 18:00:18 +02:00
Lutz Helm 6775723840 Fix error in IIIFInfo IIIF Image API v3 handling 2019-05-09 18:00:18 +02:00
Lutz Helm d332b6a0f4 Prepare IIIFInfo for JSON-LD context extensions
IIIF Image API 3 allows context extensions that should be added to the
info.json's @context property. Therefore, '@context' might be an array
instead of a string.
2019-05-09 18:00:18 +02:00
Lutz Helm f68b8d8df9 Make IIIF_PROFILE_VALUES consistent with it's doc 2019-05-09 18:00:18 +02:00
Lutz Helm c2cbae95c6 Fix codestyle in IIIFInfo tests 2019-05-09 18:00:18 +02:00
Lutz Helm b36ad87cb5 Extend IIIFInfo tests 2019-05-09 18:00:18 +02:00
Lutz Helm b7c004f95c Remove version specific IIIFInfo methods from class 2019-05-09 18:00:18 +02:00
Lutz Helm 7bfaa3b6ad Refactor IIIFInfo and add tests 2019-05-09 18:00:18 +02:00
Lutz Helm 0cffee6f83 Rename IIIFInfo format methods for more clarity 2019-05-09 18:00:18 +02:00
Lutz Helm 3895a59c5e Fix typo 2019-05-09 18:00:18 +02:00
Lutz Helm a2b39c9c53 Clean up and document IIIFInfo parser
Optional preferred options are now reduced to the two options that
depend on the image service's supported features: format and quality.
2019-05-09 18:00:18 +02:00
Lutz Helm 12154d98b4 Improve IIIF tile source documentation 2019-05-09 18:00:18 +02:00
Lutz Helm c25dba415f Add more IIIF tile source tests 2019-05-09 18:00:18 +02:00
Lutz Helm 27d943dcc3 Add tests for IIIF tile source and fix source
The tests are still incomplete.
This commit also corrects the IIIF source where tests have failed.
2019-05-09 18:00:18 +02:00
Lutz Helm 66b5b5d7e1 Cleanup IIIF example code 2019-05-09 18:00:18 +02:00
Lutz Helm 3cf9b5aa28 Add zDirection option to IIIF tile source 2019-05-09 18:00:18 +02:00
Lutz Helm b77177ed74 Fix errors in IIIF code
- missing import in IIIFInfo
- syntax errors in IIIF
2019-05-09 18:00:18 +02:00
Lutz Helm f61562a51a Remove unsupported options, document options 2019-05-09 18:00:18 +02:00
Lutz Helm e4a531de8c Declare IIIF versions as enum 2019-05-09 18:00:18 +02:00
Lutz Helm 063bc51c59 Rename IIIF features to supports
Avoid terminology confusion between OpenLayers map features and IIIF
region/size calculation capability features.
2019-05-09 18:00:18 +02:00
Lutz Helm 3f3fbe7e4b Remove IIIF source rounding workarounds
Always try to use canonical URI form. If the server serves wrong tile
heights for given w, shaped size request URI parameters, so be it.
2019-05-09 18:00:18 +02:00
Lutz Helm 01a6381756 Change the IIIF image example image 2019-05-09 18:00:18 +02:00
Lutz Helm 0ab7ad741f Add error codes for IIIF errors
60: "Missing or invalid `size`."
Without at least a size, no IIIF can be displayed.

61: "Cannot determine IIIF Image API version from provided image
information JSON."
Without finding out the version information, one could only guess how to
use the image info JSON.
2019-05-09 18:00:18 +02:00
Lutz Helm 58efe1f850 Limit IIIF tile source percentages to 10 decimals max
IIIF Image API versions 1 and 2 recommend limiting the number of
decimals digits to 10 at most.
2019-05-09 18:00:18 +02:00
Lutz Helm 66b41a53b8 Fix error in IIIF v3 level0 size paramter
Size request parameter in w,h form for level 0 services that only support
listed sizes had been using erroneous w,w instead of w,h.
2019-05-09 18:00:18 +02:00
Lutz Helm c00400c500 Add IIIF Image API tilesource with example
src/ol/source/IIIF.js contains a tile source for IIIF Image API services.
It supports Image API version 1 and 2 on compliance levels 0, 1 and 2.

To get working constructor options for IIIF from an IIIF image info.json,
use src/ol/format/IIIFInfo.js.

An example is available in examples/iiif.html respectivly examples/iiif.js.
2019-05-09 18:00:18 +02:00
Lutz Helm 085c60af49 Remove tile source zDirection getter
The renderer now accesses the zDirection member directly if it exists.
This also has the advantage of not advertising any object methods that
hav no use for most tile sources.
2019-03-21 14:47:09 +01:00
Lutz Helm 2bf217207e Test renderer behavior for Zoomify zDirection
The zDirection addition to the Zoomify tile source only takes effect through
the renderer, so these two renderer cases are added to test the behavior.

zoomify-no-zdirection expects the default behavior.
zoomify-zdirection expects the tiles for the next better resolution.
2019-03-21 11:51:42 +01:00
Lutz Helm f5abb45de0 Add a zDirection option for Zoomify
Via zDirection, the renderer's selection of a tile source's resolution can be
controlled if the view's resolution does not match any tile source resolution.

Currently the zDirection option is only available for Zoomify. The comment
https://github.com/openlayers/openlayers/issues/9343#issuecomment-474341033
describes why caution is advised when using zDirection for other sources.

ol/source/Tile~TileSource#getZDirection has been added to avoid having the
getZDirection method solely in the Zoomify source - just to document the
possibility.
2019-03-21 10:06:22 +01:00