OpenSeadragon导航器不显示缩略图图像

时间:2014-01-22 19:56:01

标签: javascript deepzoom seadragon

我正在测试OpenSeadragon以了解它如何处理自定义磁贴源。我也打开了导航仪。但是,缩略图图像不会显示在导航器中。这是我的代码:

<!DOCTYPE html>
<html>
<head>
    <title>OpenSeaDragon (OSD) Custom Tile Sources Test</title>
</head>
<body>
<div id="custom_tilesource" style="width: 800px; height: 600px;"></div>
<script src="libs/openseadragon/openseadragon.js"></script>
<script type="text/javascript">
  var viewer = OpenSeadragon({
    showNavigator: true,
    navigatorSizeRatio: 0.25,
    id: "custom_tilesource",
    prefixUrl: "libs/openseadragon/images/",
    wrapHorizontal: false,
    tileSources: {
      height: 9425,
      width:  9426,
      tileSize: 512,
      maxLevel: 14,
      minLevel: 10,
      getTileUrl: function( level, x, y ){
        var strSources = "W3siQXR0cmlidXRlcyI6eyJPcGVyYXRpb24iOiJTdW0ifSwiSWQiOm51bGwsIlR5cGUiOiJJbWFnZSJ9LHsiQXR0cmlidXRlcyI6e30sIklkIjoiMjIwOSIsIlR5cGUiOiJJbWFnZUlkIn1d";
        var strSampleRegion = 161;

        var handlerURL = "/MultiOmyxU/handler.ashx?X=" + x + "&Y=" + y + "&Level=" + level + "&Sources=" + strSources + "&Reason=SampleRegion=" + strSampleRegion;

        return handlerURL;
      }
    }
  });
</script>
</body>
</html>

如果有人遇到类似问题,请告诉我,因为我不确定如何解决此问题。

1 个答案:

答案 0 :(得分:0)

有趣。我认为如果你使用DZI而不是自定义tilesource它会起作用吗?你在控制台看到任何错误吗?你有可以分享的链接吗?

我建议将此帖子发布到OpenSeadragon问题:

https://github.com/openseadragon/openseadragon/issues

有人可能会帮助你。