Merge pull request #5589 from thhomas/wmts-tilematrixlimits

Wmts tilematrixlimits
This commit is contained in:
Bart van den Eijnden
2016-11-24 10:14:25 +01:00
committed by GitHub
6 changed files with 725 additions and 18 deletions

View File

@@ -251,6 +251,32 @@ ol.format.WMTSCapabilities.readTileMatrix_ = function(node, objectStack) {
};
/**
* @private
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} TileMatrixSetLimits Object.
*/
ol.format.WMTSCapabilities.readTileMatrixLimitsList_ = function(node,
objectStack) {
return ol.xml.pushParseAndPop([],
ol.format.WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_, node,
objectStack);
};
/**
* @private
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
* @return {Object|undefined} TileMatrixLimits Array.
*/
ol.format.WMTSCapabilities.readTileMatrixLimits_ = function(node, objectStack) {
return ol.xml.pushParseAndPop({},
ol.format.WMTSCapabilities.TMS_LIMITS_PARSERS_, node, objectStack);
};
/**
* @const
* @private
@@ -353,7 +379,40 @@ ol.format.WMTSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
ol.format.WMTSCapabilities.TMS_LINKS_PARSERS_ = ol.xml.makeStructureNS(
ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
'TileMatrixSet': ol.xml.makeObjectPropertySetter(
ol.format.XSD.readString)
ol.format.XSD.readString),
'TileMatrixSetLimits': ol.xml.makeObjectPropertySetter(
ol.format.WMTSCapabilities.readTileMatrixLimitsList_)
});
/**
* @const
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_ = ol.xml.makeStructureNS(
ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
'TileMatrixLimits': ol.xml.makeArrayPusher(
ol.format.WMTSCapabilities.readTileMatrixLimits_)
});
/**
* @const
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.TMS_LIMITS_PARSERS_ = ol.xml.makeStructureNS(
ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
'TileMatrix': ol.xml.makeObjectPropertySetter(
ol.format.XSD.readString),
'MinTileRow': ol.xml.makeObjectPropertySetter(
ol.format.XSD.readNonNegativeInteger),
'MaxTileRow': ol.xml.makeObjectPropertySetter(
ol.format.XSD.readNonNegativeInteger),
'MinTileCol': ol.xml.makeObjectPropertySetter(
ol.format.XSD.readNonNegativeInteger),
'MaxTileCol': ol.xml.makeObjectPropertySetter(
ol.format.XSD.readNonNegativeInteger)
});