These are chat archives for openseadragon/openseadragon

27th
Jul 2015
julesair
@julesair
Jul 27 2015 14:16
Hey there! I am using openseadragon two display a thematic Geotiff. Now I try to have Openstreetmap as a second layer for better orientation, but I have no clue of how to set the extent of OSM to the same extent of my GeoTiff. I know its bounding box in EPSG:3857 coordinate system (same as OSM I think...), so it shouldn't be that hard? But I am still not able to work it out. Is anyone out there who can give me a hint?
Alcatrazer
@Alcatrazer
Jul 27 2015 14:22
When serving a local HTTP server with python. Is it enough to symlink the DZI folder to the app root ?
Just beginning to use OpenSeaDragon just generated all the dzi's
Antoine Vandecreme
@avandecreme
Jul 27 2015 14:31
@Alcatrazer your HTTP server might have a restriction on symlinks. I know that apache has an option restricting symlinks by default.
Alcatrazer
@Alcatrazer
Jul 27 2015 14:32
Ok symlinks dont work. I got the image to load. But panning by clicking is not working in the demo site panning works perfectly zooming is working.
What could be wrong ?
I can zoom and the mouse picking works but not the panning.
Antoine Vandecreme
@avandecreme
Jul 27 2015 14:33
what demo site are you using?
on the official it works. IN the same browser
*In
Alcatrazer
@Alcatrazer
Jul 27 2015 14:40
OK now its working reloading the page maybe some temporary glitch.
Alcatrazer
@Alcatrazer
Jul 27 2015 15:26
How do I call next, previous inside javascript not bind to buttons ?
Assuming sequenceMode
Antoine Vandecreme
@avandecreme
Jul 27 2015 15:49
Alcatrazer: see openseadragon/openseadragon#676
Alcatrazer
@Alcatrazer
Jul 27 2015 16:06
thanks
I think in that case I have to declare viewer as a global variable to control it from other functions. I'll try.
Ian Gilman
@iangilman
Jul 27 2015 16:10
@julesair unfortunately I don't know anything about Geotiff or OSM, but I'm happy to help on the OpenSeadragon side as needed.
I guess you could start with trial and error?
Alcatrazer
@Alcatrazer
Jul 27 2015 16:30
what is the difference between "size" and "home" ?
Ian Gilman
@iangilman
Jul 27 2015 16:30
In what context?
Alcatrazer
@Alcatrazer
Jul 27 2015 16:47
reset-home reset-size
Ian Gilman
@iangilman
Jul 27 2015 16:49
Events?
Doesn't look like there is a reset-home event.
reset-size means the div the viewer is in resized
Hmm...or the home bounds evidently
What are you trying to accomplish?
Alcatrazer
@Alcatrazer
Jul 27 2015 16:51
yes whats the difference between home-bounds and content-size ?
pressing the "home" button and "reset-size" I think would accomplish the same thing as resetting scale
Ian Gilman
@iangilman
Jul 27 2015 16:51
The content size is in web coordinates and the home bounds is in viewport coordinates
Also the home bounds is tight around the image, whereas the content size describes the area of the viewer.
The viewer could be tall and the image wide, so they would be different in that case
Alcatrazer
@Alcatrazer
Jul 27 2015 16:53
ok so its better to use home vs reset-size
Ian Gilman
@iangilman
Jul 27 2015 16:53
If you just want to reset the zoom to home, you can do viewer.viewport.goHome()
Indeed. You shouldn't have to worry about the content size unless you're doing something unusual
Alcatrazer
@Alcatrazer
Jul 27 2015 16:55
whats the difference between viewer.goHome and viewer.viewport.goHome() ?
*viewer.goHome() also is the correct way to call goToPage actually viewer.viewport.goToPage() ?
Ian Gilman
@iangilman
Jul 27 2015 16:56
viewer.goHome() doesn't exist. Neither does viewer.viewport.goToPage()
Alcatrazer
@Alcatrazer
Jul 27 2015 16:59
ok I read wrong. Docs for goHome say OpenSeadragon.Viewport#goHome).
Ian Gilman
@iangilman
Jul 27 2015 16:59
Cool. I know the similar names can be confusing
julesair
@julesair
Jul 27 2015 17:48
This message was deleted
julesair
@julesair
Jul 27 2015 17:59
@iangilman The basic problem is to place a smalle image (the GeoTiff) on a larger image at an exact position. The larger image is the openstreetmap tile source, covering the whole planet. This is my "baselayer" and I define it when initializing openseadragon (https://openseadragon.github.io/examples/tilesource-osm/) I succeeded in placing the Geotiff with the following code plus changing x,y,width as required for exact positioning: viewer.addTiledImage({
tileSource: 'geotiff.dzi',
x: 0.24,
y: 0.3,
width: 0.2
}); But it does not exactly what i want, because I would like to have a sequence of images which I can browse through with the arrow in top. With the code above I have the OSM Layer and the GeoTiff at the same time, but I would like to switch between them, while keeping the same view of the mapped area.
When I add the OSM Layer and the Geotiff layer with this piece of code, I can not set the location as seen above. So basically they have the same size in the Viewport: OpenSeadragon({
...
tileSources: [ 'openstreetmap','geotiff.dzi'],
sequenceMode: true,
preserveViewport: true,
...
});
Ian Gilman
@iangilman
Jul 27 2015 18:01
@julesair makes sense. And yes, you won't be able to use sequence mode; you'll have to build it yourself.
Should be relatively easy to build that. Make a regular JavaScript button somewhere on your page and when you click it, adjust the opacities of the tiled images in the viewer.
(or add and remove tiled images)
If you want to use the buttons we use for sequence mode, that can be done as well by creating a custom button that uses those images and is attached to the viewer.
Let me know if you need help with any of that
julesair
@julesair
Jul 27 2015 18:03
Ah, this seems to be a good hint. I am still an newbie, so I do not yet understand the complete functionality of the openeadragon API, but I have a look at it!
Thanks for the hint! I have a try tomorrow
Ian Gilman
@iangilman
Jul 27 2015 18:05
Cool. I'm happy to answer questions!
Sounds good
Alcatrazer
@Alcatrazer
Jul 27 2015 21:59
Why does the mouse sometimes get stuck inside the viewport window. As in releasing mouse click creates teh effect of the mouse still being pressed panning only the image.
The only way to solve that is a page reload
Bill Criswell
@crswll
Jul 27 2015 22:25
@Alcatrazer That happens to me sometimes when I have the dev tools open. Never had it happen unless it was open.
Alcatrazer
@Alcatrazer
Jul 27 2015 22:32
crswll I am making an art practice app right now its a personal thing. Just to help me practice. Is there a way like the imageLoaded plugin to know when all the tiles have loaded of the lowest zoom level (the "Home") one. I want to add this delay too to my setTimeout so 30 seconds does not become 25 seconds because of load time of larger images.
Ian Gilman
@iangilman
Jul 27 2015 23:05
@Alcatrazer the only time I know of when we get that mouse stick is if you let up from dragging with your mouse outside of the window. @msalsbery may have more to say on the subject
Ian Gilman
@iangilman
Jul 27 2015 23:12
@Alcatrazer We don't yet have a "all tiles loaded" event, though of course that information can be known inside of OSD...I can help you dig into it if you want
Mark Salsbery
@msalsbery
Jul 27 2015 23:17
@crswll dev tools in which browser?
Bill Criswell
@crswll
Jul 27 2015 23:44
@msalsbery Chrome on occasion.
Mark Salsbery
@msalsbery
Jul 27 2015 23:57
Thanks!