Rename _ol_format_WMTSCapabilities_ to WMTSCapabilities

This commit is contained in:
Frederic Junod
2018-01-15 10:26:36 +01:00
parent 3de2085cce
commit 106fe3c138
8 changed files with 91 additions and 91 deletions

View File

@@ -1,7 +1,7 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import * as _ol_extent_ from '../src/ol/extent.js'; import * as _ol_extent_ from '../src/ol/extent.js';
import _ol_format_WMTSCapabilities_ from '../src/ol/format/WMTSCapabilities.js'; import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import {get as getProjection} from '../src/ol/proj.js'; import {get as getProjection} from '../src/ol/proj.js';
import {register} from '../src/ol/proj/proj4.js'; import {register} from '../src/ol/proj/proj4.js';
@@ -97,7 +97,7 @@ layers['wms21781'] = new TileLayer({
}) })
}); });
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
const url = 'https://map1.vis.earthdata.nasa.gov/wmts-arctic/' + const url = 'https://map1.vis.earthdata.nasa.gov/wmts-arctic/' +
'wmts.cgi?SERVICE=WMTS&request=GetCapabilities'; 'wmts.cgi?SERVICE=WMTS&request=GetCapabilities';
fetch(url).then(function(response) { fetch(url).then(function(response) {

View File

@@ -1,6 +1,6 @@
import _ol_format_WMTSCapabilities_ from '../src/ol/format/WMTSCapabilities.js'; import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js';
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
fetch('data/WMTSCapabilities.xml').then(function(response) { fetch('data/WMTSCapabilities.xml').then(function(response) {
return response.text(); return response.text();

View File

@@ -1,6 +1,6 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import _ol_format_WMTSCapabilities_ from '../src/ol/format/WMTSCapabilities.js'; import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js';
import _ol_has_ from '../src/ol/has.js'; import _ol_has_ from '../src/ol/has.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import WMTS from '../src/ol/source/WMTS.js'; import WMTS from '../src/ol/source/WMTS.js';
@@ -26,7 +26,7 @@ const map = new Map({
fetch(capabilitiesUrl).then(function(response) { fetch(capabilitiesUrl).then(function(response) {
return response.text(); return response.text();
}).then(function(text) { }).then(function(text) {
const result = new _ol_format_WMTSCapabilities_().read(text); const result = new WMTSCapabilities().read(text);
const options = WMTS.optionsFromCapabilities(result, { const options = WMTS.optionsFromCapabilities(result, {
layer: layer, layer: layer,
matrixSet: 'google3857', matrixSet: 'google3857',

View File

@@ -1,11 +1,11 @@
import Map from '../src/ol/Map.js'; import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js'; import View from '../src/ol/View.js';
import _ol_format_WMTSCapabilities_ from '../src/ol/format/WMTSCapabilities.js'; import WMTSCapabilities from '../src/ol/format/WMTSCapabilities.js';
import TileLayer from '../src/ol/layer/Tile.js'; import TileLayer from '../src/ol/layer/Tile.js';
import OSM from '../src/ol/source/OSM.js'; import OSM from '../src/ol/source/OSM.js';
import WMTS from '../src/ol/source/WMTS.js'; import WMTS from '../src/ol/source/WMTS.js';
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
let map; let map;
fetch('data/WMTSCapabilities.xml').then(function(response) { fetch('data/WMTSCapabilities.xml').then(function(response) {

View File

@@ -17,7 +17,7 @@ import _ol_xml_ from '../xml.js';
* @extends {ol.format.XML} * @extends {ol.format.XML}
* @api * @api
*/ */
const _ol_format_WMTSCapabilities_ = function() { const WMTSCapabilities = function() {
XML.call(this); XML.call(this);
/** /**
@@ -27,7 +27,7 @@ const _ol_format_WMTSCapabilities_ = function() {
this.owsParser_ = new OWS(); this.owsParser_ = new OWS();
}; };
inherits(_ol_format_WMTSCapabilities_, XML); inherits(WMTSCapabilities, XML);
/** /**
@@ -38,13 +38,13 @@ inherits(_ol_format_WMTSCapabilities_, XML);
* @return {Object} An object representing the WMTS capabilities. * @return {Object} An object representing the WMTS capabilities.
* @api * @api
*/ */
_ol_format_WMTSCapabilities_.prototype.read; WMTSCapabilities.prototype.read;
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_format_WMTSCapabilities_.prototype.readFromDocument = function(doc) { WMTSCapabilities.prototype.readFromDocument = function(doc) {
for (let n = doc.firstChild; n; n = n.nextSibling) { for (let n = doc.firstChild; n; n = n.nextSibling) {
if (n.nodeType == Node.ELEMENT_NODE) { if (n.nodeType == Node.ELEMENT_NODE) {
return this.readFromNode(n); return this.readFromNode(n);
@@ -57,7 +57,7 @@ _ol_format_WMTSCapabilities_.prototype.readFromDocument = function(doc) {
/** /**
* @inheritDoc * @inheritDoc
*/ */
_ol_format_WMTSCapabilities_.prototype.readFromNode = function(node) { WMTSCapabilities.prototype.readFromNode = function(node) {
const version = node.getAttribute('version').trim(); const version = node.getAttribute('version').trim();
let WMTSCapabilityObject = this.owsParser_.readFromNode(node); let WMTSCapabilityObject = this.owsParser_.readFromNode(node);
if (!WMTSCapabilityObject) { if (!WMTSCapabilityObject) {
@@ -65,7 +65,7 @@ _ol_format_WMTSCapabilities_.prototype.readFromNode = function(node) {
} }
WMTSCapabilityObject['version'] = version; WMTSCapabilityObject['version'] = version;
WMTSCapabilityObject = _ol_xml_.pushParseAndPop(WMTSCapabilityObject, WMTSCapabilityObject = _ol_xml_.pushParseAndPop(WMTSCapabilityObject,
_ol_format_WMTSCapabilities_.PARSERS_, node, []); WMTSCapabilities.PARSERS_, node, []);
return WMTSCapabilityObject ? WMTSCapabilityObject : null; return WMTSCapabilityObject ? WMTSCapabilityObject : null;
}; };
@@ -76,9 +76,9 @@ _ol_format_WMTSCapabilities_.prototype.readFromNode = function(node) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Attribution object. * @return {Object|undefined} Attribution object.
*/ */
_ol_format_WMTSCapabilities_.readContents_ = function(node, objectStack) { WMTSCapabilities.readContents_ = function(node, objectStack) {
return _ol_xml_.pushParseAndPop({}, return _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.CONTENTS_PARSERS_, node, objectStack); WMTSCapabilities.CONTENTS_PARSERS_, node, objectStack);
}; };
@@ -88,9 +88,9 @@ _ol_format_WMTSCapabilities_.readContents_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Layers object. * @return {Object|undefined} Layers object.
*/ */
_ol_format_WMTSCapabilities_.readLayer_ = function(node, objectStack) { WMTSCapabilities.readLayer_ = function(node, objectStack) {
return _ol_xml_.pushParseAndPop({}, return _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.LAYER_PARSERS_, node, objectStack); WMTSCapabilities.LAYER_PARSERS_, node, objectStack);
}; };
@@ -100,9 +100,9 @@ _ol_format_WMTSCapabilities_.readLayer_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Tile Matrix Set object. * @return {Object|undefined} Tile Matrix Set object.
*/ */
_ol_format_WMTSCapabilities_.readTileMatrixSet_ = function(node, objectStack) { WMTSCapabilities.readTileMatrixSet_ = function(node, objectStack) {
return _ol_xml_.pushParseAndPop({}, return _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.TMS_PARSERS_, node, objectStack); WMTSCapabilities.TMS_PARSERS_, node, objectStack);
}; };
@@ -112,9 +112,9 @@ _ol_format_WMTSCapabilities_.readTileMatrixSet_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Style object. * @return {Object|undefined} Style object.
*/ */
_ol_format_WMTSCapabilities_.readStyle_ = function(node, objectStack) { WMTSCapabilities.readStyle_ = function(node, objectStack) {
const style = _ol_xml_.pushParseAndPop({}, const style = _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.STYLE_PARSERS_, node, objectStack); WMTSCapabilities.STYLE_PARSERS_, node, objectStack);
if (!style) { if (!style) {
return undefined; return undefined;
} }
@@ -131,10 +131,10 @@ _ol_format_WMTSCapabilities_.readStyle_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Tile Matrix Set Link object. * @return {Object|undefined} Tile Matrix Set Link object.
*/ */
_ol_format_WMTSCapabilities_.readTileMatrixSetLink_ = function(node, WMTSCapabilities.readTileMatrixSetLink_ = function(node,
objectStack) { objectStack) {
return _ol_xml_.pushParseAndPop({}, return _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.TMS_LINKS_PARSERS_, node, objectStack); WMTSCapabilities.TMS_LINKS_PARSERS_, node, objectStack);
}; };
@@ -144,9 +144,9 @@ _ol_format_WMTSCapabilities_.readTileMatrixSetLink_ = function(node,
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Dimension object. * @return {Object|undefined} Dimension object.
*/ */
_ol_format_WMTSCapabilities_.readDimensions_ = function(node, objectStack) { WMTSCapabilities.readDimensions_ = function(node, objectStack) {
return _ol_xml_.pushParseAndPop({}, return _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.DIMENSION_PARSERS_, node, objectStack); WMTSCapabilities.DIMENSION_PARSERS_, node, objectStack);
}; };
@@ -156,7 +156,7 @@ _ol_format_WMTSCapabilities_.readDimensions_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Resource URL object. * @return {Object|undefined} Resource URL object.
*/ */
_ol_format_WMTSCapabilities_.readResourceUrl_ = function(node, objectStack) { WMTSCapabilities.readResourceUrl_ = function(node, objectStack) {
const format = node.getAttribute('format'); const format = node.getAttribute('format');
const template = node.getAttribute('template'); const template = node.getAttribute('template');
const resourceType = node.getAttribute('resourceType'); const resourceType = node.getAttribute('resourceType');
@@ -180,9 +180,9 @@ _ol_format_WMTSCapabilities_.readResourceUrl_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} WGS84 BBox object. * @return {Object|undefined} WGS84 BBox object.
*/ */
_ol_format_WMTSCapabilities_.readWgs84BoundingBox_ = function(node, objectStack) { WMTSCapabilities.readWgs84BoundingBox_ = function(node, objectStack) {
const coordinates = _ol_xml_.pushParseAndPop([], const coordinates = _ol_xml_.pushParseAndPop([],
_ol_format_WMTSCapabilities_.WGS84_BBOX_READERS_, node, objectStack); WMTSCapabilities.WGS84_BBOX_READERS_, node, objectStack);
if (coordinates.length != 2) { if (coordinates.length != 2) {
return undefined; return undefined;
} }
@@ -196,7 +196,7 @@ _ol_format_WMTSCapabilities_.readWgs84BoundingBox_ = function(node, objectStack)
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Legend object. * @return {Object|undefined} Legend object.
*/ */
_ol_format_WMTSCapabilities_.readLegendUrl_ = function(node, objectStack) { WMTSCapabilities.readLegendUrl_ = function(node, objectStack) {
const legend = {}; const legend = {};
legend['format'] = node.getAttribute('format'); legend['format'] = node.getAttribute('format');
legend['href'] = XLink.readHref(node); legend['href'] = XLink.readHref(node);
@@ -210,7 +210,7 @@ _ol_format_WMTSCapabilities_.readLegendUrl_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} Coordinates object. * @return {Object|undefined} Coordinates object.
*/ */
_ol_format_WMTSCapabilities_.readCoordinates_ = function(node, objectStack) { WMTSCapabilities.readCoordinates_ = function(node, objectStack) {
const coordinates = XSD.readString(node).split(' '); const coordinates = XSD.readString(node).split(' ');
if (!coordinates || coordinates.length != 2) { if (!coordinates || coordinates.length != 2) {
return undefined; return undefined;
@@ -230,9 +230,9 @@ _ol_format_WMTSCapabilities_.readCoordinates_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} TileMatrix object. * @return {Object|undefined} TileMatrix object.
*/ */
_ol_format_WMTSCapabilities_.readTileMatrix_ = function(node, objectStack) { WMTSCapabilities.readTileMatrix_ = function(node, objectStack) {
return _ol_xml_.pushParseAndPop({}, return _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.TM_PARSERS_, node, objectStack); WMTSCapabilities.TM_PARSERS_, node, objectStack);
}; };
@@ -242,10 +242,10 @@ _ol_format_WMTSCapabilities_.readTileMatrix_ = function(node, objectStack) {
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} TileMatrixSetLimits Object. * @return {Object|undefined} TileMatrixSetLimits Object.
*/ */
_ol_format_WMTSCapabilities_.readTileMatrixLimitsList_ = function(node, WMTSCapabilities.readTileMatrixLimitsList_ = function(node,
objectStack) { objectStack) {
return _ol_xml_.pushParseAndPop([], return _ol_xml_.pushParseAndPop([],
_ol_format_WMTSCapabilities_.TMS_LIMITS_LIST_PARSERS_, node, WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_, node,
objectStack); objectStack);
}; };
@@ -256,9 +256,9 @@ _ol_format_WMTSCapabilities_.readTileMatrixLimitsList_ = function(node,
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} TileMatrixLimits Array. * @return {Object|undefined} TileMatrixLimits Array.
*/ */
_ol_format_WMTSCapabilities_.readTileMatrixLimits_ = function(node, objectStack) { WMTSCapabilities.readTileMatrixLimits_ = function(node, objectStack) {
return _ol_xml_.pushParseAndPop({}, return _ol_xml_.pushParseAndPop({},
_ol_format_WMTSCapabilities_.TMS_LIMITS_PARSERS_, node, objectStack); WMTSCapabilities.TMS_LIMITS_PARSERS_, node, objectStack);
}; };
@@ -267,7 +267,7 @@ _ol_format_WMTSCapabilities_.readTileMatrixLimits_ = function(node, objectStack)
* @private * @private
* @type {Array.<string>} * @type {Array.<string>}
*/ */
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_ = [ WMTSCapabilities.NAMESPACE_URIS_ = [
null, null,
'http://www.opengis.net/wmts/1.0' 'http://www.opengis.net/wmts/1.0'
]; ];
@@ -278,7 +278,7 @@ _ol_format_WMTSCapabilities_.NAMESPACE_URIS_ = [
* @private * @private
* @type {Array.<string>} * @type {Array.<string>}
*/ */
_ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_ = [ WMTSCapabilities.OWS_NAMESPACE_URIS_ = [
null, null,
'http://www.opengis.net/ows/1.1' 'http://www.opengis.net/ows/1.1'
]; ];
@@ -289,10 +289,10 @@ _ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_ = [
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'Contents': _ol_xml_.makeObjectPropertySetter( 'Contents': _ol_xml_.makeObjectPropertySetter(
_ol_format_WMTSCapabilities_.readContents_) WMTSCapabilities.readContents_)
}); });
@@ -301,12 +301,12 @@ _ol_format_WMTSCapabilities_.PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.CONTENTS_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.CONTENTS_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'Layer': _ol_xml_.makeObjectPropertyPusher( 'Layer': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readLayer_), WMTSCapabilities.readLayer_),
'TileMatrixSet': _ol_xml_.makeObjectPropertyPusher( 'TileMatrixSet': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readTileMatrixSet_) WMTSCapabilities.readTileMatrixSet_)
}); });
@@ -315,25 +315,25 @@ _ol_format_WMTSCapabilities_.CONTENTS_PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.LAYER_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.LAYER_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'Style': _ol_xml_.makeObjectPropertyPusher( 'Style': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readStyle_), WMTSCapabilities.readStyle_),
'Format': _ol_xml_.makeObjectPropertyPusher( 'Format': _ol_xml_.makeObjectPropertyPusher(
XSD.readString), XSD.readString),
'TileMatrixSetLink': _ol_xml_.makeObjectPropertyPusher( 'TileMatrixSetLink': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readTileMatrixSetLink_), WMTSCapabilities.readTileMatrixSetLink_),
'Dimension': _ol_xml_.makeObjectPropertyPusher( 'Dimension': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readDimensions_), WMTSCapabilities.readDimensions_),
'ResourceURL': _ol_xml_.makeObjectPropertyPusher( 'ResourceURL': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readResourceUrl_) WMTSCapabilities.readResourceUrl_)
}, _ol_xml_.makeStructureNS(_ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_, { }, _ol_xml_.makeStructureNS(WMTSCapabilities.OWS_NAMESPACE_URIS_, {
'Title': _ol_xml_.makeObjectPropertySetter( 'Title': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'Abstract': _ol_xml_.makeObjectPropertySetter( 'Abstract': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'WGS84BoundingBox': _ol_xml_.makeObjectPropertySetter( 'WGS84BoundingBox': _ol_xml_.makeObjectPropertySetter(
_ol_format_WMTSCapabilities_.readWgs84BoundingBox_), WMTSCapabilities.readWgs84BoundingBox_),
'Identifier': _ol_xml_.makeObjectPropertySetter( 'Identifier': _ol_xml_.makeObjectPropertySetter(
XSD.readString) XSD.readString)
})); }));
@@ -344,11 +344,11 @@ _ol_format_WMTSCapabilities_.LAYER_PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.STYLE_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.STYLE_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'LegendURL': _ol_xml_.makeObjectPropertyPusher( 'LegendURL': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readLegendUrl_) WMTSCapabilities.readLegendUrl_)
}, _ol_xml_.makeStructureNS(_ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_, { }, _ol_xml_.makeStructureNS(WMTSCapabilities.OWS_NAMESPACE_URIS_, {
'Title': _ol_xml_.makeObjectPropertySetter( 'Title': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'Identifier': _ol_xml_.makeObjectPropertySetter( 'Identifier': _ol_xml_.makeObjectPropertySetter(
@@ -361,12 +361,12 @@ _ol_format_WMTSCapabilities_.STYLE_PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.TMS_LINKS_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.TMS_LINKS_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'TileMatrixSet': _ol_xml_.makeObjectPropertySetter( 'TileMatrixSet': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'TileMatrixSetLimits': _ol_xml_.makeObjectPropertySetter( 'TileMatrixSetLimits': _ol_xml_.makeObjectPropertySetter(
_ol_format_WMTSCapabilities_.readTileMatrixLimitsList_) WMTSCapabilities.readTileMatrixLimitsList_)
}); });
/** /**
@@ -374,10 +374,10 @@ _ol_format_WMTSCapabilities_.TMS_LINKS_PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.TMS_LIMITS_LIST_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'TileMatrixLimits': _ol_xml_.makeArrayPusher( 'TileMatrixLimits': _ol_xml_.makeArrayPusher(
_ol_format_WMTSCapabilities_.readTileMatrixLimits_) WMTSCapabilities.readTileMatrixLimits_)
}); });
@@ -386,8 +386,8 @@ _ol_format_WMTSCapabilities_.TMS_LIMITS_LIST_PARSERS_ = _ol_xml_.makeStructureNS
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.TMS_LIMITS_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.TMS_LIMITS_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'TileMatrix': _ol_xml_.makeObjectPropertySetter( 'TileMatrix': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'MinTileRow': _ol_xml_.makeObjectPropertySetter( 'MinTileRow': _ol_xml_.makeObjectPropertySetter(
@@ -406,13 +406,13 @@ _ol_format_WMTSCapabilities_.TMS_LIMITS_PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.DIMENSION_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.DIMENSION_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'Default': _ol_xml_.makeObjectPropertySetter( 'Default': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'Value': _ol_xml_.makeObjectPropertyPusher( 'Value': _ol_xml_.makeObjectPropertyPusher(
XSD.readString) XSD.readString)
}, _ol_xml_.makeStructureNS(_ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_, { }, _ol_xml_.makeStructureNS(WMTSCapabilities.OWS_NAMESPACE_URIS_, {
'Identifier': _ol_xml_.makeObjectPropertySetter( 'Identifier': _ol_xml_.makeObjectPropertySetter(
XSD.readString) XSD.readString)
})); }));
@@ -423,12 +423,12 @@ _ol_format_WMTSCapabilities_.DIMENSION_PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.WGS84_BBOX_READERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.WGS84_BBOX_READERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_, { WMTSCapabilities.OWS_NAMESPACE_URIS_, {
'LowerCorner': _ol_xml_.makeArrayPusher( 'LowerCorner': _ol_xml_.makeArrayPusher(
_ol_format_WMTSCapabilities_.readCoordinates_), WMTSCapabilities.readCoordinates_),
'UpperCorner': _ol_xml_.makeArrayPusher( 'UpperCorner': _ol_xml_.makeArrayPusher(
_ol_format_WMTSCapabilities_.readCoordinates_) WMTSCapabilities.readCoordinates_)
}); });
@@ -437,13 +437,13 @@ _ol_format_WMTSCapabilities_.WGS84_BBOX_READERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.TMS_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.TMS_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'WellKnownScaleSet': _ol_xml_.makeObjectPropertySetter( 'WellKnownScaleSet': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'TileMatrix': _ol_xml_.makeObjectPropertyPusher( 'TileMatrix': _ol_xml_.makeObjectPropertyPusher(
_ol_format_WMTSCapabilities_.readTileMatrix_) WMTSCapabilities.readTileMatrix_)
}, _ol_xml_.makeStructureNS(_ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_, { }, _ol_xml_.makeStructureNS(WMTSCapabilities.OWS_NAMESPACE_URIS_, {
'SupportedCRS': _ol_xml_.makeObjectPropertySetter( 'SupportedCRS': _ol_xml_.makeObjectPropertySetter(
XSD.readString), XSD.readString),
'Identifier': _ol_xml_.makeObjectPropertySetter( 'Identifier': _ol_xml_.makeObjectPropertySetter(
@@ -456,10 +456,10 @@ _ol_format_WMTSCapabilities_.TMS_PARSERS_ = _ol_xml_.makeStructureNS(
* @type {Object.<string, Object.<string, ol.XmlParser>>} * @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private * @private
*/ */
_ol_format_WMTSCapabilities_.TM_PARSERS_ = _ol_xml_.makeStructureNS( WMTSCapabilities.TM_PARSERS_ = _ol_xml_.makeStructureNS(
_ol_format_WMTSCapabilities_.NAMESPACE_URIS_, { WMTSCapabilities.NAMESPACE_URIS_, {
'TopLeftCorner': _ol_xml_.makeObjectPropertySetter( 'TopLeftCorner': _ol_xml_.makeObjectPropertySetter(
_ol_format_WMTSCapabilities_.readCoordinates_), WMTSCapabilities.readCoordinates_),
'ScaleDenominator': _ol_xml_.makeObjectPropertySetter( 'ScaleDenominator': _ol_xml_.makeObjectPropertySetter(
XSD.readDecimal), XSD.readDecimal),
'TileWidth': _ol_xml_.makeObjectPropertySetter( 'TileWidth': _ol_xml_.makeObjectPropertySetter(
@@ -470,8 +470,8 @@ _ol_format_WMTSCapabilities_.TM_PARSERS_ = _ol_xml_.makeStructureNS(
XSD.readNonNegativeInteger), XSD.readNonNegativeInteger),
'MatrixHeight': _ol_xml_.makeObjectPropertySetter( 'MatrixHeight': _ol_xml_.makeObjectPropertySetter(
XSD.readNonNegativeInteger) XSD.readNonNegativeInteger)
}, _ol_xml_.makeStructureNS(_ol_format_WMTSCapabilities_.OWS_NAMESPACE_URIS_, { }, _ol_xml_.makeStructureNS(WMTSCapabilities.OWS_NAMESPACE_URIS_, {
'Identifier': _ol_xml_.makeObjectPropertySetter( 'Identifier': _ol_xml_.makeObjectPropertySetter(
XSD.readString) XSD.readString)
})); }));
export default _ol_format_WMTSCapabilities_; export default WMTSCapabilities;

View File

@@ -1,11 +1,11 @@
import _ol_format_WMTSCapabilities_ from '../../../../src/ol/format/WMTSCapabilities.js'; import WMTSCapabilities from '../../../../src/ol/format/WMTSCapabilities.js';
describe('ol.format.WMTSCapabilities', function() { describe('ol.format.WMTSCapabilities', function() {
describe('when parsing ogcsample.xml', function() { describe('when parsing ogcsample.xml', function() {
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
let capabilities; let capabilities;
before(function(done) { before(function(done) {
afterLoadText('spec/ol/format/wmts/ogcsample.xml', function(xml) { afterLoadText('spec/ol/format/wmts/ogcsample.xml', function(xml) {
@@ -116,7 +116,7 @@ describe('ol.format.WMTSCapabilities', function() {
describe('when parsing ign.xml', function() { describe('when parsing ign.xml', function() {
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
let capabilities; let capabilities;
before(function(done) { before(function(done) {
afterLoadText('spec/ol/format/wmts/ign.xml', function(xml) { afterLoadText('spec/ol/format/wmts/ign.xml', function(xml) {

View File

@@ -1,4 +1,4 @@
import _ol_format_WMTSCapabilities_ from '../../../../src/ol/format/WMTSCapabilities.js'; import WMTSCapabilities from '../../../../src/ol/format/WMTSCapabilities.js';
import {get as getProjection} from '../../../../src/ol/proj.js'; import {get as getProjection} from '../../../../src/ol/proj.js';
import Projection from '../../../../src/ol/proj/Projection.js'; import Projection from '../../../../src/ol/proj/Projection.js';
import WMTSTileGrid from '../../../../src/ol/tilegrid/WMTS.js'; import WMTSTileGrid from '../../../../src/ol/tilegrid/WMTS.js';
@@ -8,7 +8,7 @@ import WMTS from '../../../../src/ol/source/WMTS.js';
describe('ol.source.WMTS', function() { describe('ol.source.WMTS', function() {
describe('when creating options from capabilities', function() { describe('when creating options from capabilities', function() {
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
let capabilities, content; let capabilities, content;
before(function(done) { before(function(done) {
afterLoadText('spec/ol/format/wmts/ogcsample.xml', function(xml) { afterLoadText('spec/ol/format/wmts/ogcsample.xml', function(xml) {
@@ -232,7 +232,7 @@ describe('ol.source.WMTS', function() {
}); });
describe('when creating options from Esri capabilities', function() { describe('when creating options from Esri capabilities', function() {
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
let capabilities; let capabilities;
before(function(done) { before(function(done) {
afterLoadText('spec/ol/format/wmts/arcgis.xml', function(xml) { afterLoadText('spec/ol/format/wmts/arcgis.xml', function(xml) {

View File

@@ -1,11 +1,11 @@
import _ol_format_WMTSCapabilities_ from '../../../../src/ol/format/WMTSCapabilities.js'; import WMTSCapabilities from '../../../../src/ol/format/WMTSCapabilities.js';
import {createFromCapabilitiesMatrixSet} from '../../../../src/ol/tilegrid/WMTS.js'; import {createFromCapabilitiesMatrixSet} from '../../../../src/ol/tilegrid/WMTS.js';
describe('ol.tilegrid.WMTS', function() { describe('ol.tilegrid.WMTS', function() {
describe('when creating tileGrid from capabilities', function() { describe('when creating tileGrid from capabilities', function() {
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
let capabilities; let capabilities;
before(function(done) { before(function(done) {
afterLoadText('spec/ol/format/wmts/ogcsample.xml', function(xml) { afterLoadText('spec/ol/format/wmts/ogcsample.xml', function(xml) {
@@ -58,7 +58,7 @@ describe('ol.tilegrid.WMTS', function() {
describe('when creating tileGrid from capabilities with and without TileMatrixSetLimits', describe('when creating tileGrid from capabilities with and without TileMatrixSetLimits',
function() { function() {
const parser = new _ol_format_WMTSCapabilities_(); const parser = new WMTSCapabilities();
let capabilities; let capabilities;
before(function(done) { before(function(done) {
afterLoadText('spec/ol/format/wmts/ign.xml', function(xml) { afterLoadText('spec/ol/format/wmts/ign.xml', function(xml) {