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

Empty file on first click #121

Open
dario85-dev opened this issue Oct 30, 2020 · 1 comment
Open

Empty file on first click #121

dario85-dev opened this issue Oct 30, 2020 · 1 comment

Comments

@dario85-dev
Copy link

dario85-dev commented Oct 30, 2020

    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');

Screenshot 2020-10-30 at 10 50 16

if i trigger button a second time the map is downloaded correctly.

@cplpearce
Copy link

Can you share the Current object you're trying to use?

Like this:

 const currentView = { 
    width: $("#map").width(),
    name: 'Current View',
    height: $("#map").height(),
    className: 'MyClassName',
    tooltip: 'Current View Port'
  }

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