From 2bf217207e37a82f4547dd9522db72f087b69744 Mon Sep 17 00:00:00 2001 From: Lutz Helm Date: Thu, 21 Mar 2019 11:51:42 +0100 Subject: [PATCH] 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. --- .../cases/zoomify-no-zdirection/expected.png | Bin 0 -> 778 bytes rendering/cases/zoomify-no-zdirection/main.js | 25 +++++++++++++++++ .../cases/zoomify-zdirection/expected.png | Bin 0 -> 801 bytes rendering/cases/zoomify-zdirection/main.js | 26 ++++++++++++++++++ .../data/tiles/zoomify/TileGroup0/0-0-0.jpg | Bin 0 -> 733 bytes .../data/tiles/zoomify/TileGroup0/1-0-0.jpg | Bin 0 -> 670 bytes .../data/tiles/zoomify/TileGroup0/1-0-1.jpg | Bin 0 -> 734 bytes .../data/tiles/zoomify/TileGroup0/1-1-0.jpg | Bin 0 -> 670 bytes .../data/tiles/zoomify/TileGroup0/1-1-1.jpg | Bin 0 -> 669 bytes 9 files changed, 51 insertions(+) create mode 100644 rendering/cases/zoomify-no-zdirection/expected.png create mode 100644 rendering/cases/zoomify-no-zdirection/main.js create mode 100644 rendering/cases/zoomify-zdirection/expected.png create mode 100644 rendering/cases/zoomify-zdirection/main.js create mode 100644 rendering/data/tiles/zoomify/TileGroup0/0-0-0.jpg create mode 100644 rendering/data/tiles/zoomify/TileGroup0/1-0-0.jpg create mode 100644 rendering/data/tiles/zoomify/TileGroup0/1-0-1.jpg create mode 100644 rendering/data/tiles/zoomify/TileGroup0/1-1-0.jpg create mode 100644 rendering/data/tiles/zoomify/TileGroup0/1-1-1.jpg diff --git a/rendering/cases/zoomify-no-zdirection/expected.png b/rendering/cases/zoomify-no-zdirection/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..599dd1ea74d9a9729a16e3e16ce6edb1fd5c4e27 GIT binary patch literal 778 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6GJC5?=1xi$!3N`lsM<-=BDPA0J#hd&PAz- zC8;S2<(VZJ3hti10V#T^>J@=W@1YU|t6?>E*?`#*u3ijDz$in{)D0ESc#RYQzCNB%e- jBFVgCaKxSf!-G)%U`g(u&jepZ4u$WME?8U{GLa0Q!d-3<^#9ur&AX z;{7@Ho|l#^Q()+>JX8GhY5e3f^PYTA3}N{5e|m{Tn>lrZ5fmL1#mu>x+f3OCn5h=8 ikn}-rQfZj~i@`ftymp$p>O5f5W$<+Mb6Mw<&;$U1G;fOl literal 0 HcmV?d00001 diff --git a/rendering/cases/zoomify-zdirection/main.js b/rendering/cases/zoomify-zdirection/main.js new file mode 100644 index 0000000000..9a854dae6a --- /dev/null +++ b/rendering/cases/zoomify-zdirection/main.js @@ -0,0 +1,26 @@ +import Map from '../../../src/ol/Map.js'; +import View from '../../../src/ol/View.js'; +import TileLayer from '../../../src/ol/layer/Tile.js'; +import Zoomify from '../../../src/ol/source/Zoomify.js'; + +const layer = new TileLayer({ + source: new Zoomify({ + url: '/data/tiles/zoomify/', + size: [200, 200], + tileSize: 100, + zDirection: -1 + }) +}); + +new Map({ + layers: [layer], + target: 'map', + view: new View({ + resolutions: [2, 1], + extent: [0, -200, 200, 0], + center: [100, -100], + zoom: 0.4 + }) +}); + +render(); diff --git a/rendering/data/tiles/zoomify/TileGroup0/0-0-0.jpg b/rendering/data/tiles/zoomify/TileGroup0/0-0-0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..384ca04dca7a11935e12ec16803293468e8f2b10 GIT binary patch literal 733 zcmc(bO-{ow5QX2^ag)Yzuv@!yS(ZIT7L^J`LgETYsRTQODzW5D9Doht5d3U731+Mc zq#zp96>nx^`?H_l#OL@9d%9dLK}0y=Lj1sZakIYItlQb`)#h?`ygECNZ&*MIk(!lp zt3s(PQ)QkHimI$CU21LWku|lewYC%M#y*5l9UM+4eme5Or$X*;FrDvz(IBtckd0eUd^-SfRyckJWsPn&DDDcGEpm?yyf r4oISg`T+3_?6ep(TZ^3lHAnNW)Q}v|M*MU2PsIK;kuA^@n1Pp1gyW2B literal 0 HcmV?d00001 diff --git a/rendering/data/tiles/zoomify/TileGroup0/1-0-0.jpg b/rendering/data/tiles/zoomify/TileGroup0/1-0-0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..70c233194ac7571978b52b4fb404b5b0a5a13bb5 GIT binary patch literal 670 zcmbu4O-chn5QSfLPft42J!5y$GiGO8<`lCCL?Z;ef-nKyi3B`?SMV4fLBvD&v+*Rh zH3WqOlMwQ{HeGyGuU>qMUvL+b=>$ZCbAE{5=#TH_SBrTwyuVpo56`Bv%lL^gq!4Yf z5-z2cN)nZII;pmqwI(wrFM2L7d|`~MobQLSEbYz wiBSvq{{cx<(>6f-0UIsSdTFr{p!#(5n;Meyaqxq5vLlh(m1qfUIhcX>ADoCyrvLx| literal 0 HcmV?d00001 diff --git a/rendering/data/tiles/zoomify/TileGroup0/1-0-1.jpg b/rendering/data/tiles/zoomify/TileGroup0/1-0-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bf9daae993fc1b607d73d8a03449e40520bed4ce GIT binary patch literal 734 zcmc(b!AiqG5QhKR%_eC!Nq5`b*ke8RDRL;ZRw(!iLJE2lDfk+md?4{5)LuOL6s{AB zLW_;`)S0>L@Xh@DPk0R^+^%oN^TqNiY%qlsqAiYy zOQlLhk;;-JPV+3!b*6Pu4op$nQfpHgJ9OUryni;T+-TsuYnPDZnMn1N>bXJ}?&t{5 zuqhfek}QNJX(_zG^Z&6M3AZbDwbzf+@Qz#(gpmfIr_asf?%=VnJ_|XsCxbhdNm-nf vn6!ZX8<0dbbphfRI4BXt0|3i literal 0 HcmV?d00001 diff --git a/rendering/data/tiles/zoomify/TileGroup0/1-1-0.jpg b/rendering/data/tiles/zoomify/TileGroup0/1-1-0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dad6e34193b99929c3523d9c64b622fb21e63f54 GIT binary patch literal 670 zcmbu4QAz_b5QhIrHrsTwyC!Y2_OU+p6#G!9RuH^`umyb(L<*k5b9e$hfOrVC4|)>g zEJdNkwiN%&ONMXepFh6FPuSDRbOIv62|vUy^vAcei}|b>-d)WvhsV>i^SHnmQi!%# z3767JC5g&9omA&po}0{=qU_nCbfq!2vaat#2>HR`pz?#B558SOl4latRjTU?Q~13V zpW!qbG?E;IBk3r4aouR;`-@7^|2$7-IZtwY&n>Lw{ObAcb5PF literal 0 HcmV?d00001 diff --git a/rendering/data/tiles/zoomify/TileGroup0/1-1-1.jpg b/rendering/data/tiles/zoomify/TileGroup0/1-1-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..948eaec38b5ebc00843aa014341aa16cca9cee64 GIT binary patch literal 669 zcmbu4K}rKL6o%hRCNtAXW_)Rr+GSn#6tgI_wovd2!W48Nh!k9U6mKD}Mequ0H=e}! zLQxp8EyX|oCdrrl?+>rx186>(O#l($loy0g=#6id=c{EiyuDmq45zcjSy;muq!7`p zgspO=l0+3*mgc4~Mi*L_RhP=jR$5b^Y|nY`&C&6o?*?7xUHk+kze!X_sg5gk=?+$S z0-HkvjYJE=qO=&E!SnpkRvM3EtG2T64n`sfk_3SFk1y@}gLgIOIQkuP%`rKLqY|SC v*uMdZSmQ20`~X`c(s~oI6~Ovr^xYaH7o@9)^?!V~rxERIv;lSu%)r|hz*u)= literal 0 HcmV?d00001