tiny bugfix
jcupitt opened this issue · comments
a typo in loadGrid() will cause problems for non-square tiles
Oh thanks! Well spotted! If you do a pull request I'll merge it directly
I tried to make a pull request, but it didn't show the button for some reason :-( the patch is in a branch off a branch after some changes, perhaps things have to be directly off master for a pull to happen. I'll try again.
Off-topic, but I'm having a go at an RTI viewer based on iipmoo. I've made a tiny webgl tile viewer here:
https://github.com/jcupitt/maps-viewer-webgl
and I'm going to try to paste that into iipmoo. It should add a couple of nice features:
- it keeps a cache of all recent tiles at all resolutions, so while a high-res tile is coming in it can show a low-res placeholder
- it loads tiles asynchronously during a pan or zoom, so the display updates constantly
- it should be easy to support fractional zoom levels, so you can do smooth zooming, though it doesn't do it now
- it doesn't support rotate, though it would be easy to add
- because it's webgl you can do anything you like during tile display, like RTI, or perhaps some fancy blending scheme that's beyond what you can do with CSS
On the downside of course you need a webgl browser, though I think everyone is supporting it now. It works well on mobile too!
Anyway, if you're interested I can make a pull request for this stuff as well, once (or if) it's done.
OK, your fixes are now merged.
WebGL support is a great idea. I've been meaning to look into this for a while, but haven't had time so far. So, any implementation from you would be great.
The canvas element is another possible solution, which is more widely supported by browsers. There's a demo implementation here: http://image.iap.fr/iipcanvas/hrsc.html for doing client-side channel recombinations, but it's a little buggy.
Here's a test integration! It's a lightly-modified iipmooviewer with a webgl tile renderer:
http://jcupitt.github.io/iipmooviewer/
Sources here:
https://github.com/jcupitt/iipmooviewer
It's only a few changes, so it should be compatible: I removed loadGrid
and tiles
, and got requestImages
to ask the webgl renderer to update. I added a onDrag
handler to move the webgl thing during a drag event. And createWindows
makes the new renderer as an extra fixed canvas at the back of the stacking order.
Rotation doesn't work, but that would be fixable. It should work with touch, but I've not tried yet. Annotations work.