Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



79 Commits

Repository files navigation


Adds support for displaying geo-referenced WMTS tile maps in OpenSeadragon.

See online demo.


Download the latest release or grab directly from the CDN. Import into your page:

<script src=""></script>

Or install via npm:

$ npm install openseadragon-wmts


var viewer = OpenSeadragon({
  id: "openseadragon",
  prefixUrl: ""

// Initialize the plugin
var map = await OpenSeadragonWMTS(viewer, {
  url: ''

// The map object provides functions to convert OSD coordinates to WGS84
var mouseTracker = new OpenSeadragon.MouseTracker({
  element: viewer.container,

  moveHandler: function(event) {
    var viewportPoint = viewer.viewport.pointFromPixel(event.position);

    var lonlat = map.viewportToLonLat(viewportPoint);



Per default, the plugin displays the first available map layer with the default style. To select a specific layer and style:

var map = await OpenSeadragon.WMTS(viewer, {
  url: '',
  layer: 'Orthofoto 2020',
  style: 'farbe'


Method Type
imageToLonLat [x, y] Image X/Y to lon/lat
lonLatToImageCoordinates [lon, lat] lon/lat to image X/Y
lonLatToMapCoordinates [lon, lat] lon/lat to map projection
lonLatToViewportCoordinates [lon, lat] lon/lat to OSD viewport X/Y
mapToLonLat [east, north] Map projection to lon/lat
mapToViewportCoordinates [east, north] Map projection to OSD viewport X/Y
viewportToLonLat [x, y] OSD viewport X/Y to lon/lat
viewportToMapCoordinates [x, y] OSD viewport X/Y to map projection