Add ol.TileUrlFunction.createFromTemplates
This commit is contained in:
@@ -34,3 +34,12 @@ ol.TileUrlFunction.createFromTileUrlFunctions = function(tileUrlFunctions) {
|
|||||||
return tileUrlFunctions[index](tileCoord);
|
return tileUrlFunctions[index](tileCoord);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Array.<string>} templates Templates.
|
||||||
|
*/
|
||||||
|
ol.TileUrlFunction.createFromTemplates = function(templates) {
|
||||||
|
return ol.TileUrlFunction.createFromTileUrlFunctions(
|
||||||
|
goog.array.map(templates, ol.TileUrlFunction.createFromTemplate));
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user