Package Exports
- wmsc
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 (wmsc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
WMS-C
WMS-C scheme for Javascript applications.
http://wiki.osgeo.org/wiki/WMS_Tiling_Client_Recommendation /proxy/service?layers=osm&width=1184&version=1.1.1&bbox=4924990.60647,2968202.68237,5015492.04796,3058704.12386&service=WMS&format=image%2Fpng&styles=&srs=EPSG%3A3857&request=GetMap&height=1184
Install
npm
$ yarn add wmscweb browser (ES5)
<script src="https://unpkg.com/wmsc/docs/wmsc.min.js"></script>Quickstart
const wmsc = require('wmsc')
const xml = wmsc.getCapabilities({
url: 'http://localhost:5000/WMSC',
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, north]options.spacesnumber? Spaces created for XML output (optional, default2)
Examples
const xml = wmsc.getCapabilities({
url: 'http://localhost:5000/WMTS',
title: 'Tile Service XYZ',
identifier: 'service-123',
abstract: '© OSM data',
keyword: ['world', 'imagery', 'wmsc'],
format: 'png',
minzoom: 10,
maxzoom: 18,
bbox: [-180, -85, 180, 85]
})Returns string XML string