Open yog3sha opened 3 years ago
i've done like this in angular
import * as L from 'leaflet'; import 'leaflet-easyprint';
this.printControl = (L as any).easyPrint({ title: 'Print Me', position: 'bottomleft', sizeModes: ['Current'], filename: this.uid, exportOnly: true, tileWait: 4000, hidden: true, hideControlContainer: true }).addTo(this.map);
this.printControl.printMap('CurrentSize');
I am unable to find easyPrint function to call it in typescript. I have created leaflet map in my Vue+TS app using component imports as follows
import { LMap, LTileLayer, LMarker, LPopup, LIcon, LControl } from "vue2-leaflet"; import 'leaflet-easyprint'; import { EasyPrintControl, EasyPrintOptions } from '../../leaflet-easyprint';
And I am trying to print map as follows: ` const printer = L.easyPrint({ hidden: false, exportOnly: false });
`