Add ol.source.WMTS#getUrls
This commit is contained in:
@@ -2,6 +2,7 @@ goog.provide('ol.TileUrlFunction');
|
||||
goog.provide('ol.TileUrlFunctionType');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.math');
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.tilecoord');
|
||||
@@ -74,6 +75,8 @@ ol.TileUrlFunction.createFromTemplates = function(templates) {
|
||||
* @return {ol.TileUrlFunctionType} Tile URL function.
|
||||
*/
|
||||
ol.TileUrlFunction.createFromTileUrlFunctions = function(tileUrlFunctions) {
|
||||
goog.asserts.assert(tileUrlFunctions.length > 0,
|
||||
'Length of tile url functions should be greater than 0');
|
||||
if (tileUrlFunctions.length === 1) {
|
||||
return tileUrlFunctions[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user