AW-4605
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2023-02-02 09:42:57 +01:00
parent 2588732b91
commit 846eee1ae5

View File

@ -139,9 +139,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
} }
if (l && l.rendering && l.rendering.renderoutputType == "Image") { if (l && l.rendering && l.rendering.renderoutputType == "Image") {
var ri = l.rendering as IRenderoutputImage; var ri = l.rendering as IRenderoutputImage;
// convert to EPSG:4326 asworkaround for cesium let source = new ImageStatic({ imageExtent:ri.extent,projection:'EPSG:3857', crossOrigin: 'use-credentials', url: `${this._apiEndPoint}/api/v1/items/${item.code}/mapimage/${layerIndex}?v=${Date.parse(item.updated)}` });
var projectedExtent = proj.transformExtent( ri.extent, 'EPSG:3857','EPSG:4326');
let source = new ImageStatic({ imageExtent:projectedExtent,projection:'EPSG:4326', crossOrigin: 'use-credentials', url: `${this._apiEndPoint}/api/v1/items/${item.code}/mapimage/${layerIndex}?v=${Date.parse(item.updated)}` });
layer = new Image({ source: source }); layer = new Image({ source: source });
} }
return layer; return layer;