Add WMTS GetCapabilities parser

Implements WMTS GetCapabilities parser, which depends partly on
an OWSCommon parser.

Integration with the layer source will be done at a later stage.
This commit is contained in:
Bart van den Eijnden
2013-02-19 16:32:56 +01:00
parent a55a6bda3b
commit 5e29830462
16 changed files with 1334 additions and 2 deletions
+20 -2
View File
@@ -36,8 +36,9 @@ ol.ProjectionUnits = {
* @param {string} code Code.
* @param {ol.ProjectionUnits} units Units.
* @param {ol.Extent} extent Extent.
* @param {string=} opt_axis Axis order.
*/
ol.Projection = function(code, units, extent) {
ol.Projection = function(code, units, extent, opt_axis) {
/**
* @private
@@ -57,6 +58,12 @@ ol.Projection = function(code, units, extent) {
*/
this.extent_ = extent;
/**
* @private
* @type {string}
*/
this.axis_ = opt_axis || 'enu';
};
@@ -84,6 +91,14 @@ ol.Projection.prototype.getUnits = function() {
};
/**
* @return {string} Axis.
*/
ol.Projection.prototype.getAxis = function() {
return this.axis_;
};
/**
* @constructor
@@ -526,6 +541,7 @@ ol.Projection.EPSG_4326_EXTENT_ = new ol.Extent(-180, -90, 180, 90);
*/
ol.Projection.EPSG_4326_LIKE_CODES_ = [
'CRS:84',
'urn:ogc:def:crs:OGC:1.3:CRS84',
'EPSG:4326',
'urn:ogc:def:crs:EPSG:6.6:4326'
];
@@ -543,7 +559,9 @@ ol.Projection.EPSG_4326_LIKE_PROJECTIONS = goog.array.map(
return new ol.Projection(
code,
ol.ProjectionUnits.DEGREES,
ol.Projection.EPSG_4326_EXTENT_);
ol.Projection.EPSG_4326_EXTENT_,
code === 'CRS:84' || code === 'urn:ogc:def:crs:OGC:1.3:CRS84' ?
'enu' : 'neu');
});