Skip to content

Instantly share code, notes, and snippets.

@foobarable
Created February 23, 2016 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foobarable/72ba3e25d55707daa7ce to your computer and use it in GitHub Desktop.
Save foobarable/72ba3e25d55707daa7ce to your computer and use it in GitHub Desktop.
ViewerService.createZoomifyTilesource = function (images) {
if (images) {
console.log(images);
var tilesources = [];
for(var i=0;i<images.length;i++) {
var tilesource = {
type:"zoomifytileservice",
width: images[i].dimx,
height: images[i].dimy,
tileSize:256,
tilesUrl: images[i].zoom};
tilesources.push(tilesource);
}
var options = {
collectionMode: true,
collectionRows: 6,
collectionTileSize: 1024,
collectionTileMargin: 256,
showNavigator: true,
debugMode: true,
navigatorPosition: "TOP_RIGHT",
navigatorHeight: "120px",
navigatorWidth: "145px",
prefixUrl: "assets/images/openseadragon/",
tileSources: tilesources,
};
return options;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment