Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including wmts with all npm packages installed. Try it out:

var wmts = require("wmts")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

wmts v2.0.0

WMTS scheme for Javascript applications


Build Status npm version MIT licensed

Standard - JavaScript Style Guide

Flexible WMTS scheme for Javascript applications.



$ yarn add wmts

web browser (ES5)

<script src=""></script>


const xml = wmts.getCapabilities({
  url: 'http://localhost:5000/WMTS',
  title: 'Tile Service XYZ',
  format: 'png',
<declaration version="1.0" encoding="utf-8"/>
<Capabilities xmlns="" xmlns:ows="" xmlns:xlink="" xmlns:xsi="" xmlns:gml="" xsi:schemaLocation="" version="1.0.0">
  <ServiceMetadataURL xlink:href="http://localhost:80/WMTS/1.0.0/WMTSCapabilities.xml"/>
    <ows:ServiceType>OGC WMTS</ows:ServiceType>



Get Capabilities


  • options Options Options
    • options.url string URL of WMTS service
    • options.title string Title of service
    • options.format string Format 'png' | 'jpeg' | 'jpg'
    • options.minzoom number? Minimum zoom level (optional, default 0)
    • options.maxzoom number? Maximum zoom level (optional, default 22)
    • options.accessConstraints string? Access Constraints
    • options.fees string? Fees
    • options.abstract string? Abstract
    • options.identifier string? Identifier
    • options.keywords Array<string>? Keywords
    • options.bbox BBox? BBox [west, south, east, north]
    • options.spaces number? Spaces created for XML output (optional, default 2)


const xml = wmts.getCapabilities({
  url: 'http://localhost:5000/WMTS',
  title: 'Tile Service XYZ',
  identifier: 'service-123',
  abstract: '© OSM data',
  keyword: ['world', 'imagery', 'wmts'],
  format: 'png',
  minzoom: 10,
  maxzoom: 18,
  bbox: [-180, -85, 180, 85]

Returns string XML string


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free