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:
@@ -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]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user