Merge pull request #9624 from fredj/cleanup
Remove typecasts in ol/control/OverviewMap
This commit is contained in:
@@ -76,7 +76,7 @@ class OverviewMap extends Control {
|
|||||||
*/
|
*/
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options ? opt_options : {};
|
const options = opt_options ? opt_options : /** @type {Options} */ ({});
|
||||||
|
|
||||||
super({
|
super({
|
||||||
element: document.createElement('div'),
|
element: document.createElement('div'),
|
||||||
@@ -159,13 +159,9 @@ class OverviewMap extends Control {
|
|||||||
const ovmap = this.ovmap_;
|
const ovmap = this.ovmap_;
|
||||||
|
|
||||||
if (options.layers) {
|
if (options.layers) {
|
||||||
/** @type {Array<import("../layer/Layer.js").default>} */ (options.layers).forEach(
|
options.layers.forEach(function(layer) {
|
||||||
/**
|
ovmap.addLayer(layer);
|
||||||
* @param {import("../layer/Layer.js").default} layer Layer.
|
});
|
||||||
*/
|
|
||||||
(function(layer) {
|
|
||||||
ovmap.addLayer(layer);
|
|
||||||
}).bind(this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const box = document.createElement('div');
|
const box = document.createElement('div');
|
||||||
|
|||||||
Reference in New Issue
Block a user