Skip to content

Commit

Permalink
🐛 Fix issue in case of no legend layout is set by admin (#723)
Browse files Browse the repository at this point in the history
Co-authored-by: Raruto <[email protected]>
(cherry picked from commit 3587125)
  • Loading branch information
volterra79 authored and github-actions[bot] committed Feb 11, 2025
1 parent 836a760 commit c67f861
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/map/layers/imagelayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ class RasterLayer extends G3WObject {
projection,
crossOrigin: undefined,
tileLoadFunction: (this.iframe_internal) ? (tile, url) => {
fetch('POST' === method ? (url || '').split('?')[0] : url, {
method,
fetch('POST' === this._method ? (url || '').split('?')[0] : url, {
method: this._method,
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
body: 'POST' === method ? url.split('?')[1] : undefined,
body: 'POST' === this._method ? url.split('?')[1] : undefined,
})
.then(async response => tile.getImage().src = window.URL.createObjectURL(await response.blob()))
.catch(e => { console.error('Invalid tile', ol.TileState.ERROR, e); tile.setState(ol.TileState.ERROR); });
Expand Down

0 comments on commit c67f861

Please sign in to comment.