Add required referrer when loading tiles from openstreetmap.org
Signed-off-by: Maximilian Krög <maximilian.kroeg@geocept.com>
This commit is contained in:
parent
4c0760bf5d
commit
b2f5a93986
@ -446,7 +446,13 @@ class GisVisualization
|
||||
. 'target: \'openlayersmap\','
|
||||
. 'layers: ['
|
||||
. 'new ol.layer.Tile({'
|
||||
. 'source: new ol.source.OSM()'
|
||||
. 'source: new ol.source.OSM({'
|
||||
. 'tileLoadFunction: function (imageTile, src) {'
|
||||
. 'const image = imageTile.getImage();'
|
||||
. 'if (image instanceof HTMLImageElement) {'
|
||||
. "image.referrerPolicy = 'origin-when-cross-origin';"
|
||||
. '}'
|
||||
. 'image.src = src; }})'
|
||||
. '}),'
|
||||
. 'new ol.layer.Vector({'
|
||||
. 'source: vectorLayer'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user