0

我正在测试 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>

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

4

1 回答 1

0

Interesting. I assume it works if you use a DZI instead of a custom tilesource? Are you seeing any errors in the console? Do you have a link you can share?

I recommend posting this to the OpenSeadragon issues:

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

Someone might be able to help you there.

于 2014-01-23T17:19:20.023 回答