mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 21:26:10 +03:00
63 lines
1.9 KiB
HTML
63 lines
1.9 KiB
HTML
<h2>
|
|
example: tiledmapservice support
|
|
</h2>
|
|
<p>
|
|
The Tiled Map Service TMS tile is a tile scheme ( [ as supported by OpenLayers ]
|
|
is described here ( <a href="http://openlayers.org/dev/examples/tms.html"
|
|
>http://openlayers.org/dev/examples/tms.html</a> ) )
|
|
</p>
|
|
<p>
|
|
OpenSeadragon has added support for TMS tile sources thanks to
|
|
Rainer Simon (http://github.com/rsimon).
|
|
</p>
|
|
|
|
|
|
<div class="description">
|
|
<h3>Inline Configuration for Tiled Map Services</h3>
|
|
<p>
|
|
Inline configuration couldn't be much simpler for using a TMS as a tile source.
|
|
</p>
|
|
</div>
|
|
<div class="demoarea">
|
|
<div class="demoheading">
|
|
Example Inline Configuration for TMS tile sources
|
|
</div>
|
|
<div id="example-inline-configuration-for-tms"
|
|
class="openseadragon">
|
|
</div>
|
|
<p>
|
|
Configuration is done via the 'tileSources' option ( or programatically ). Because of its rich
|
|
levels and depth, we slow down the zoomPerScroll option a litte, wrap horitonally, and hide the
|
|
navigator. Also we set a lower minimum zoom pixel ratio to allow the user to pull back just a little further.
|
|
</p>
|
|
<pre>
|
|
OpenSeadragon({
|
|
...
|
|
showNavigator: false,
|
|
wrapHorizontal: true,
|
|
zoomPerScroll: 1.2,
|
|
minZoomImageRatio: 0.5,
|
|
tileSources: [{
|
|
type: 'openstreetmaps'
|
|
}]
|
|
...
|
|
});</pre>
|
|
</div>
|
|
<script type="text/javascript">
|
|
OpenSeadragon({
|
|
id: "example-inline-configuration-for-tms",
|
|
prefixUrl: "/openseadragon/images/",
|
|
showNavigator: false,
|
|
wrapHorizontal: true,
|
|
zoomPerScroll: 1.2,
|
|
minZoomImageRatio: 0.5,
|
|
tileSources: [{
|
|
type: 'tiledmapservice',
|
|
tilesUrl: 'http://tilecache.osgeo.org/wms-c/tilecache.py/1.0.0/basic/',
|
|
width: 256 * 65534,
|
|
height: 256 * 32767
|
|
}]
|
|
});
|
|
</script>
|
|
|