Skip to content

Map breaks into two pages in smaller screens #129

@promisemorka

Description

@promisemorka

Describe the bug
I've encountered an issue in my Angular project using leaflet.browser.print where the map consistently splits across two pages during printing, despite not encountering this problem on larger screens. Please how can I resolve this.

To Reproduce

  onMapReady($event: L.Map) {
    this.map = $event;
    L.control
      .browserPrint({
        title: 'Print Map',
      })
      .addTo(this.map);

    this.map.on('browser-print-start', (e: any) => {
      const legend = this.createLegend();
      legend.addTo(e.printMap);
    });
  }

Expected behavior
The map should be displayed on a single page during the print preview.

Screenshots
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions