forked from MapComplete/MapComplete
More fixes to export functionality
This commit is contained in:
parent
5cd7f0976e
commit
27da2b8116
4 changed files with 29 additions and 116 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue