rowanwins / leaflet-easyPrint

A leaflet plugin which adds an icon to print the map - Demo @ http://rowanwins.github.io/leaflet-easyPrint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Background gray in firefox but works on Chrome and Edge

nuukcillo opened this issue · comments

With this configuration, when I try to print, it works perfectly on Chromium-based browsers, but in Firefox, I always get a gray background.

const map = L.map('map').setView([39.5, -0.45], 8.5);

const tileLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution: '© OpenStreetMap contributors'
}).addTo(map);

L.easyPrint({
    sizeModes: ['Current', 'A4Landscape', 'A4Portrait'],
    filename: 'mapa_meteo',
    exportOnly: true,
    hideControlContainer: true,
    tileWait: 20000,
    tileLayer: tileLayer,
}).addTo(map);

// Here I load a GeoJson with data

Example images

Chrome:

imagen

Firefox:

imagen

I've tried printMap() method and using dom-to-img with similar results.

I'm seeing the same problem.