These are chat archives for openseadragon/openseadragon

23rd
Nov 2016
Patrick Liechty
@patrickliechty
Nov 23 2016 19:32
I have a question about viewport relative location: https://openseadragon.github.io/docs/OpenSeadragon.Viewer.html#addOverlay
I pass in a Rect: $.Rect {x: -5, y: 0.488895914618598, width: 10, height: 0.03, degrees: 0} but my overlay doesn't show
Tristan Roddis
@tristanr-cogapp
Nov 23 2016 19:41
So, I'm trying to create a viewer that zooms infinitely: loading in a new tiled image every time it gets to the zoom level of a single pixel of the current image
But I've run into problems at high zoom levels: when I try to use tiledImage.intersection() to find out what images are overalpping the viewport, I suddenly find all images appearing again at high zoom levels
Where high is a viewport of 1.2 x e-8, or 0.01 pixels visible from an initial 7200px image
I'm guessing I've hit some sort of integer arithmetic limit
Can anyone recommend how to solve this, or any other workaround?
E.g. can I reset the viewport coordinates? Zoom to the newly loaded image, then delete the previous highly-zoomed one? Etc.?
Ian Gilman
@iangilman
Nov 23 2016 19:57
@patrickliechty Have you done something special with your viewport coordinates? If not, the image stretches from 0 on the left to 1 on the right, so your x and y should be within that range.
@tristanr-cogapp Sounds like fun! And yes, you're running into math limits. You need to reset everything periodically by zooming way back out and repositioning your images to match.
Here's my infinite zoom with OSD (no user control though): http://iangilman.com/openseadragon/chrisjordan/
Patrick Liechty
@patrickliechty
Nov 23 2016 20:01
@iangilman When I use $.Rect{x: -1000, y: 50, width: 10000, height: 25}; it works fine, but does not scale correctly when I zoom in
There is another developer that works on the code. I will have to see if he does something with the viewport
Alexey Tikhonov
@altert
Nov 23 2016 20:13
@iangilman hi. I’m creating a site that uses map with points of interest grouped depending on zoom (e.g. circle with 10 means there are 10 photographs, if I zoom in they are ungrouped to show exact locations). Are there some solutions already there, or might be in this case it’s easier to use leaflet.js?
Tristan Roddis
@tristanr-cogapp
Nov 23 2016 20:24
Thanks @iangilman I'll take a look
Ian Gilman
@iangilman
Nov 23 2016 21:05
@patrickliechty Interesting... in what way does it not scale correctly?
@altert I'm not aware of a feature/plugin like that for OSD. If leaflet already has it, that may be your best bet
Alexey Tikhonov
@altert
Nov 23 2016 21:06
@iangilman thanks. btw, that Donskoi project just won gold prize on icom international museum festival)
Ian Gilman
@iangilman
Nov 23 2016 21:09
Awesome... congrats!
Alexey Tikhonov
@altert
Nov 23 2016 21:09
thanks
Ian Gilman
@iangilman
Nov 23 2016 21:09
Does that mean we need a new "In the Wild" section for awards OSD-powered sites have received? :)
Alexey Tikhonov
@altert
Nov 23 2016 21:10
hehe. I don’t think so. I wouldn’t choose library based on awards somebody won somewhere)
Ian Gilman
@iangilman
Nov 23 2016 21:19
:)
Anyway, pretty cool!
Tristan Roddis
@tristanr-cogapp
Nov 23 2016 22:38
@iangilman I had a look at your infinite code, but I can't work out which part of it actually resets the viewport to stop all the math errors
The actual Chris Jordan site is great, btw!
Ian Gilman
@iangilman
Nov 23 2016 22:39
Thanks :)
Taking a look...
Tristan Roddis
@tristanr-cogapp
Nov 23 2016 22:41
I can see how you're removing images from the world, and I've got that working, but it doesn't seem to help my viewport to image intersection problem: that still fails at high zoom levels even if I've removed the great-grandparent image
Alexey Tikhonov
@altert
Nov 23 2016 22:41
@iangilman afaik navigator is just another viewer, right? I want to make external navigator and load another tilesource into it, do you think it could be possible?
Ian Gilman
@iangilman
Nov 23 2016 22:42
@tristanr-cogapp It's in the if (intersectionArea === viewArea) section of frame(). I resize all of the images to compensate for the zoom and then I reset the zoom to 1.
@altert Yes, the navigator is a viewer plus a little bit extra. If you want to make an external navigator, you can base it off of the OSD navigator... I don't think there's a lot of code there
I've been wanting the navigator to get spun out as a plugin so we can have more variations on it...
Tristan Roddis
@tristanr-cogapp
Nov 23 2016 22:44
Great, thanks @iangilman. I'll attempt something similar.
Ian Gilman
@iangilman
Nov 23 2016 22:44
:thumbsup:
@altert Also check out the "Custom Navigator Location" section on http://openseadragon.github.io/examples/ui-viewport-navigator/
Alexey Tikhonov
@altert
Nov 23 2016 22:46
oh just what I need. I’ll just need to feed it another image)
thanks
Ian Gilman
@iangilman
Nov 23 2016 22:46
:)