2.0.0 • Published 8 years ago
wmts v2.0.0
WMTS
Flexible WMTS scheme for Javascript applications.
Install
npm
$ yarn add wmtsweb browser (ES5)
<script src="https://unpkg.com/wmts/docs/wmts.min.js"></script>Quickstart
const xml = wmts.getCapabilities({
url: 'http://localhost:5000/WMTS',
title: 'Tile Service XYZ',
format: 'png',
})
//=xml<declaration version="1.0" encoding="utf-8"/>
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<ServiceMetadataURL xlink:href="http://localhost:80/WMTS/1.0.0/WMTSCapabilities.xml"/>
<ows:ServiceIdentification>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
...API
getCapabilities
Get Capabilities
Parameters
optionsOptions Optionsoptions.urlstring URL of WMTS serviceoptions.titlestring Title of serviceoptions.formatstring Format 'png' | 'jpeg' | 'jpg'options.minzoomnumber? Minimum zoom level (optional, default0)options.maxzoomnumber? Maximum zoom level (optional, default22)options.accessConstraintsstring? Access Constraintsoptions.feesstring? Feesoptions.abstractstring? Abstractoptions.identifierstring? Identifieroptions.keywordsArray<string>? Keywordsoptions.bboxBBox? BBox west, south, east, northoptions.spacesnumber? Spaces created for XML output (optional, default2)
Examples
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
2.0.0
8 years ago
1.8.1
8 years ago
1.8.0
8 years ago
1.7.2
8 years ago
1.7.1
8 years ago
1.7.0
8 years ago
1.6.0
9 years ago
1.5.3
9 years ago
1.5.2
9 years ago
1.5.1
9 years ago
1.5.0
9 years ago
1.4.0
9 years ago
1.3.3
9 years ago
1.3.2
9 years ago
1.3.1
9 years ago
1.3.0
9 years ago
1.2.4
9 years ago
1.2.3
9 years ago
1.2.2
9 years ago
1.2.1
9 years ago
1.2.0
9 years ago
1.0.3
9 years ago
1.0.2
9 years ago
1.0.1
9 years ago
1.0.0
9 years ago