Small fixes

This commit is contained in:
Pieter Vander Vennet 2021-07-28 12:36:39 +02:00
parent 06ce2ebe8c
commit 1d2d098167
2 changed files with 11 additions and 9 deletions

View file

@ -46,16 +46,17 @@ export default class ExportPDF {
// We create a minimap at the given location and attach it to the given 'hidden' element
const l = options.location.data;
const loc = {
lat : l.lat,
lon: l.lon,
zoom: l.zoom + 1
}
const minimap = new Minimap({
location: options.location.map(l => ({
lat : l.lat,
lon: l.lon,
zoom: l.zoom + 1
})),
location: new UIEventSource<Loc>(loc), // We remove the link between the old and the new UI-event source as moving the map while the export is running fucks up the screenshot
background: options.background,
allowMoving: true,
allowMoving: false,
onFullyLoaded: leaflet => window.setTimeout(() => {
try{
self.CreatePdf(leaflet)