Package Exports
- wmts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wmts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
WMTS
Flexible WMTS scheme for Javascript applications.
Install
$ npm install --save wtmsUsage
getCapabilities
Get Capabilities
Parameters
options[Options](default {}) Optionsoptions.spaces[number] Spaces created for XML output (optional, default2)options.titlestring Title of serviceoptions.formatstring Format 'png' | 'jpeg' | 'jpg'options.urlstring URL of WMTS serviceoptions.fees[string] Feesoptions.abstract[string] Abstractoptions.identifier[string] Identifieroptions.keywords[Array<string>] Keywordsoptions.bbox[BBox] BBox [west, south, east, north] (optional, default[-180,-85,180,85])options.accessConstraints[string] Access Constraints
minzoom[number] Minimum zoom level (optional, default0)maxzoom[number] Maximum zoom level (optional, default22)
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
Capabilities
Capabilities JSON scheme
Parameters
options[Options](default {}) Optionsoptions.urlstring URL of WMTS service
Examples
Capabilities({
url: 'http://localhost:5000'
})Returns ElementCompact JSON scheme
GoogleMapsCompatible
GoogleMapsCompatible JSON scheme
Parameters
minzoom[number] Minimum zoom level (optional, default0)maxzoom[number] Maximum zoom level (optional, default22)
Examples
wmts.GoogleMapsCompatible(10, 17)Returns ElementCompact JSON scheme
TileMatrix
TileMatrix JSON scheme
Parameters
minzoom[number] Minimum zoom level (optional, default0)maxzoom[number] Maximum zoom level (optional, default22)
Examples
wmts.TileMatrix(0, 18)Returns ElementCompact JSON scheme
ServiceIdentification
ServiceIdentification JSON scheme
Parameters
options[Options](default {}) Options
Examples
ServiceIdentification({
title: 'Service name',
abstract: 'A long description of this service',
keywords: ['world', 'wmts', 'imagery']
})Returns ElementCompact JSON scheme
Keywords
Keywords JSON scheme
Parameters
Examples
Keywords(['world', 'imagery', 'wmts'])Returns ElementCompact JSON scheme
OperationsMetadata
OperationsMetadata JSON scheme
Parameters
urlstring URL of Service Provider
Examples
OperationsMetadata('http://localhost:5000/wmts')Returns ElementCompact JSON scheme
Operation
Operation JSON scheme
Parameters
Returns ElementCompact JSON scheme
Get
Get JSON scheme
Parameters
Examples
Get()
//= Get > Constraint > AllowedValues> ValueReturns ElementCompact JSON scheme
Contents
Capabilities.Contents JSON scheme
Parameters
options[Options](default {}) Options
Examples
Contents()
//= Contents > [Layer, TileMatrixSet, TileMatrixSet]Returns Element
Layer
Capabilities.Contents.Layer JSON scheme
Parameters
options[Options](default {}) Options
Examples
Layer({
title: 'Tile Service'
url: 'http://localhost:5000/wmts'
format: 'jpg'
})Returns ElementCompact JSON scheme
clean
Clean remove undefined attributes from object
Parameters
objObject
normalize
Normalize URL
Parameters
urlstring
Returns string Normalized URL
error
Pretty Error message
Parameters
message...Any
License
MIT © Denis Carriere