question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

viewer.addTiledImage why not adding tileSources or tileSource 2 pages?

See original GitHub issue
for (var i = 0; i < len; ++i) {
                     
                           if (len > 1) {
                               switch (i) {
                                   case 0:
                                       tiff.setDirectory(i);
                                       var canvas1 = tiff.toCanvas();
                                       var im1 = tiff.toDataURL();
                                       break;


                                   case 1:
                                       tiff.setDirectory(i);
                                       var canvas2 = tiff.toCanvas();
                                       var im2 = tiff.toDataURL();                                     
                                       break;
                                   default:
                                       break;
                               }
                         
                            viewer.addTiledImage({

                                   tileSources: [
                                       {
                                           type: "image",
                                           url:im1
                                       },
                                       {
                                           type: "image",
                                           url: im2
                                       }


                                   ],

                               });                            
                           }
                           else {
                               tiff.setDirectory(i);
                               var canvas = tiff.toCanvas();
                                 viewer.addTiledImage({


                                   tileSource: {
                                       type: 'image',
                                       url: canvas.toDataURL(),
                                       buildPyramid: false
                                   },


                               });
                               

                        
                        

                           }
                       }

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
umitoguzcommented, Apr 14, 2021

you are awesome.it worked thank you so much. I’m closing the issue.

0reactions
iangilmancommented, Apr 13, 2021

This should work:

viewer.open([
  {
    type: "image",
    url:im1
  },
  {
    type: "image",
    url: im2
  }
]);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Clarify options for open(), addTiledImage(), and the ... - GitHub
I'm not a huge fan of that, since: var viewer = OpenSeadragon({ tileSources: [{ tileSource: url }] }); ... seems a bit much...
Read more >
openseadragon/openseadragon - Gitter
The OSD instance with the tileSource in the original constructor was working fine but ... After 1, count is 2 (the overlay, plus...
Read more >
OpenSeadragon & multiple images
This gist demonstrates how to use OpenSeadragon in order to overlap two tiled images and switch between them using an opacity slider control ......
Read more >
Class: TiledImage - OpenSeadragon
Handles rendering of tiles for an OpenSeadragon.Viewer . A new instance is created for each TileSource opened. Members, Methods, Events ...
Read more >
How to control the loading order of multiple images in ...
You can try using the 'open' event and adding the next image once ... addTiledImage({ tileSource: source[i], index: i, opacity:0 }); viewer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found