Skip to content

Commit e436901

Browse files
committed
Website updates
1 parent 456cecb commit e436901

File tree

11 files changed

+28
-11
lines changed

11 files changed

+28
-11
lines changed

dist/en/main/apidoc/module-ol_source_OSM-OSM.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ <h4 class="name">
171171

172172
<div class="tag-source">
173173
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/source/OSM.js">source/OSM.js</a>,
174-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/source/OSM.js#L52">line 52</a>
174+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/source/OSM.js#L53">line 53</a>
175175
</div>
176176

177177
</div>

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/source/OSM.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/source/OSM.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @module ol/source/OSM
33
*/
44

5+
import {defaultTileLoadFunction} from './TileImage.js';
56
import XYZ from './XYZ.js';
67

78
/**
@@ -79,7 +80,18 @@ class OSM extends XYZ {
7980
interpolate: options.interpolate,
8081
maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,
8182
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
82-
tileLoadFunction: options.tileLoadFunction,
83+
tileLoadFunction:
84+
/**
85+
* @param {import("../ImageTile.js").default} tile Image tile
86+
* @param {string} src Image src
87+
*/
88+
(tile, src) => {
89+
const image = tile.getImage();
90+
if (image instanceof HTMLImageElement) {
91+
image.referrerPolicy = 'origin-when-cross-origin';
92+
}
93+
(options.tileLoadFunction || defaultTileLoadFunction)(tile, src);
94+
},
8395
transition: options.transition,
8496
url: url,
8597
wrapX: options.wrapX,

dist/en/main/ol/source/TileImage.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* @param {ImageTile} imageTile Image tile.
3+
* @param {string} src Source.
4+
*/
5+
export function defaultTileLoadFunction(imageTile: ImageTile, src: string): void;
16
export default TileImage;
27
export type Options = {
38
/**
@@ -98,6 +103,7 @@ export type Options = {
98103
*/
99104
zDirection?: number | import("../array.js").NearestDirectionFunction | undefined;
100105
};
106+
import ImageTile from '../ImageTile.js';
101107
/**
102108
* @typedef {Object} Options
103109
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
@@ -235,7 +241,6 @@ declare class TileImage extends UrlTile {
235241
*/
236242
setTileGridForProjection(projection: import("../proj.js").ProjectionLike, tilegrid: import("../tilegrid/TileGrid.js").default): void;
237243
}
238-
import ImageTile from '../ImageTile.js';
239244
import UrlTile from './UrlTile.js';
240245
import ReprojTile from '../reproj/Tile.js';
241246
//# sourceMappingURL=TileImage.d.ts.map

dist/en/main/ol/source/TileImage.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)