leaflet-easyPrint
leaflet-easyPrint copied to clipboard
Print only gray background
Strange behavior when using Yandex maps, when using OpenStreetMap everything is fine.
var tiles=L.tileLayer( 'http://vec{s}.maps.yandex.net/tiles?l=map&v=4.55.2&z={z}&x={x}&y={y}&scale=2&lang=ru_RU', { subdomains: ['01', '02', '03', '04'], attribution: '<a http="yandex.ru" target="_blank">Яндекс</a>' } ).addTo(map);
var printer = L.easyPrint({ tileLayer: tiles, sizeModes: ['CurrentSize','A4Portrait'], filename: 'test_file', exportOnly: true, hideControlContainer:true, tileWait: 2000 }).addTo(map);
Here part of the map is still displayed, but this is one file of 10 tests:
Unfortunately 95% chance that this is due to CORS errors from the tile source. Someone did propose a fix here so that might be an option...