ol 9.0.1-dev.1709147539193 → 9.0.1-dev.1709292731025
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/control/Attribution.d.ts.map +1 -1
- package/control/Attribution.js +7 -2
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/package.json +1 -1
- package/source/Google.d.ts +16 -5
- package/source/Google.d.ts.map +1 -1
- package/source/Google.js +62 -9
- package/util.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Attribution.d.ts","sourceRoot":"","sources":["Attribution.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Attribution.d.ts","sourceRoot":"","sources":["Attribution.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCuB,OAAO,gBAAgB,EAAE,OAAO,KAAE,IAAI;;AAtB7D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;GAQG;AACH;IACE;;OAEG;IACH,2CAsIC;IA7HC;;;OAGG;IACH,mBAA8C;IAE9C;;;OAGG;IACH,mBAC4D;IAE5D;;;OAGG;IACH,uBAAqC;IAErC;;;OAGG;IACH,6BAA6D;IAE7D;;;OAGG;IACH,qBACgE;IA0B9D;;;OAGG;IACH,uBAAoD;IAUpD;;;OAGG;IACH,eAA4C;IAU9C;;;OAGG;IACH,sBAAqD;IAyBrD;;;;OAIG;IACH,8BAA+B;IAE/B;;;OAGG;IACH,yBAA4B;IAG9B;;;;;OAKG;IACH,mCAoBC;IAED;;;OAGG;IACH,uBAmCC;IAED;;;OAGG;IACH,qBAIC;IAED;;OAEG;IACH,sBASC;IAED;;;;OAIG;IACH,kBAHY,OAAO,CAKlB;IAED;;;;OAIG;IACH,4BAHW,OAAO,QAYjB;IAED;;;;;;OAMG;IACH,wBAHW,OAAO,QASjB;IAED;;;;;OAKG;IACH,gBAHY,OAAO,CAKlB;CAUF;oBA9UmB,cAAc"}
|
package/control/Attribution.js
CHANGED
|
@@ -6,6 +6,7 @@ import EventType from '../events/EventType.js';
|
|
|
6
6
|
import {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';
|
|
7
7
|
import {equals} from '../array.js';
|
|
8
8
|
import {removeChildren, replaceNode} from '../dom.js';
|
|
9
|
+
import {toPromise} from '../functions.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* @typedef {Object} Options
|
|
@@ -215,7 +216,7 @@ class Attribution extends Control {
|
|
|
215
216
|
* @private
|
|
216
217
|
* @param {?import("../Map.js").FrameState} frameState Frame state.
|
|
217
218
|
*/
|
|
218
|
-
updateElement_(frameState) {
|
|
219
|
+
async updateElement_(frameState) {
|
|
219
220
|
if (!frameState) {
|
|
220
221
|
if (this.renderedVisible_) {
|
|
221
222
|
this.element.style.display = 'none';
|
|
@@ -224,7 +225,11 @@ class Attribution extends Control {
|
|
|
224
225
|
return;
|
|
225
226
|
}
|
|
226
227
|
|
|
227
|
-
const attributions =
|
|
228
|
+
const attributions = await Promise.all(
|
|
229
|
+
this.collectSourceAttributions_(frameState).map((attribution) =>
|
|
230
|
+
toPromise(() => attribution),
|
|
231
|
+
),
|
|
232
|
+
);
|
|
228
233
|
|
|
229
234
|
const visible = attributions.length > 0;
|
|
230
235
|
if (this.renderedVisible_ != visible) {
|