Skip to content

Instantly share code, notes, and snippets.

@foobarable
Created February 25, 2016 07:23
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/89b3317ed705b0ade756 to your computer and use it in GitHub Desktop.
Save foobarable/89b3317ed705b0ade756 to your computer and use it in GitHub Desktop.
ViewerService.createZoomifyTilesource = function (images) {
if (typeof(images) !== 'undefined' && images.length>0) {
var tilesources = [];
for(var i=0;i<images.length;i++) {
var tilesource = {
type:"zoomifytileservice",
width: images[i].dimx,
height: images[i].dimy,]
x: 2*i,
y: 0,
tileSize:256,
tilesUrl: images[i].zoom
};
tilesources.push(tilesource);
}
var options = {
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