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

View File

@@ -88,3 +88,19 @@ ol.Coordinate.toStringXY = function(coordinate, opt_precision) {
return '';
}
};
/**
* Create an ol.Coordinate from an Array and take into account axis order.
* @param {Array} array The array with coordinates.
* @param {string} axis the axis info.
* @return {ol.Coordinate} The coordinate created.
*/
ol.Coordinate.fromProjectedArray = function(array, axis) {
var firstAxis = axis.charAt(0);
if (firstAxis === 'n' || firstAxis === 's') {
return new ol.Coordinate(array[1], array[0]);
} else {
return new ol.Coordinate(array[0], array[1]);
}
};