Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background gray in firefox but works on Chrome and Edge #137

Open
nuukcillo opened this issue Feb 6, 2024 · 1 comment
Open

Background gray in firefox but works on Chrome and Edge #137

nuukcillo opened this issue Feb 6, 2024 · 1 comment

Comments

@nuukcillo
Copy link

nuukcillo commented Feb 6, 2024

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.

@ramirez
Copy link

ramirez commented Mar 22, 2024

I'm seeing the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants