wmts
Flexible WMTS scheme for Javascript applications
Last updated 3 years ago by deniscarriere .
MIT · Bugs · Original npm · Tarball · package.json
$ cnpm install wmts 
SYNC missed versions from official npm registry.

WMTS

Build Status npm version MIT licensed

Standard - JavaScript Style Guide

Flexible WMTS scheme for Javascript applications.

Install

npm

$ yarn add wmts

web 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

  • 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)

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

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

25 Versions

  • 2.0.0                                ...           3 years ago
  • 1.8.1                                ...           3 years ago
  • 1.8.0                                ...           3 years ago
  • 1.7.2                                ...           3 years ago
  • 1.7.1                                ...           3 years ago
  • 1.7.0                                ...           3 years ago
  • 1.6.0                                ...           3 years ago
  • 1.5.3                                ...           3 years ago
  • 1.5.2                                ...           3 years ago
  • 1.5.1                                ...           3 years ago
  • 1.5.0                                ...           3 years ago
  • 1.4.0                                ...           3 years ago
  • 1.3.3                                ...           3 years ago
  • 1.3.2                                ...           3 years ago
  • 1.3.1                                ...           3 years ago
  • 1.3.0                                ...           3 years ago
  • 1.2.4                                ...           3 years ago
  • 1.2.3                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 34
Dependencies (4)
Dev Dependencies (7)

Copyright 2014 - 2017 © taobao.org |