More fixes to export functionality

This commit is contained in:
Pieter Vander Vennet 2024-03-31 21:14:29 +02:00
parent 5cd7f0976e
commit 27da2b8116
4 changed files with 29 additions and 116 deletions

View file

@ -65,9 +65,12 @@ export class PngMapCreator {
document.getElementById(freeComponentId).appendChild(div)
const newZoom = settings.zoom.data + Math.log2(pixelRatio) - 1
const rasterLayerProperties = settings.rasterLayer.data?.properties ?? AvailableRasterLayers.defaultBackgroundLayer.properties
const style = rasterLayerProperties?.style ?? rasterLayerProperties?.url
console.log("Png-map-creator: initing MlMap with style", style, rasterLayerProperties)
const mapElem = new MlMap({
container: div.id,
style: settings.rasterLayer.data?.properties?.url ?? AvailableRasterLayers.defaultBackgroundLayer.properties.url,
style,
center: [l.lon, l.lat],
zoom: newZoom,
pixelRatio,