Open CarlosBustos1 opened 5 years ago
@CarlosBustos1 Any news about it ? Any help ? I have the same problem...
@CarlosBustos1 Any news about it ? Any help ? I have the same problem...
Hello @micabrunel , I do not have any solution for the problem.
I think you have to pass the className of custom size in the printMap() function, it works for me
printer.printMap('a3CssClass', 'MyManualPrint')
Hello, if I export a map via easy.Print control with custom size everything works fine, but if I export manually an error ocurr: index.js:110 Uncaught TypeError: Cannot read property 'className' of undefined at e.printMap (index.js:110) at manualPrint (index.html:104) at HTMLButtonElement.onclick (index.html:111)
Here is what I have: jsFiddle
This is my custom size options:
var mapSizeOption = { width: 1500, height: 1000, className: 'a3CssClass', tooltip: 'Export map' }
easy control:
var printer = L.easyPrint({ tileLayer: tiles, tileWait:1500, sizeModes: [mapSizeOption], filename: 'myMap', exportOnly: true, hideControlContainer: true }).addTo(map);
and to export manually:
printer.printMap(mapSizeOption, 'MyManualPrint')
Thanks for your excelent job!