Class PrintPageBuilder

Build the html page for print

Source : file printRoute/PrintPageBuilder.js at line 51

Constructor

new PrintPageBuilder ( route, printViews, printRouteMapOptions )

The constructor

Source : file printRoute/PrintPageBuilder.js at line 333

Parameters

Name Type Description
route Route

A reference to the printed route

printViews Array of PrintView

A reference to the views to print

printRouteMapOptions PrintRouteMapOptions

A reference to the PrintRouteMapOptions object containing the user choices

Public methods

onAfterPrint ( )

Remove the print views and restore the map and user interface after printing

Source : file printRoute/PrintPageBuilder.js at line 134

preparePage ( )

Hide existing HTMLElements, add the toolbar, prepare the polyline and add the views to the html page

Source : file printRoute/PrintPageBuilder.js at line 354

Private properties

#afterPrintEL : AfterPrintEL

Event listener for the cancel button and the document. Reset the document in the correct state

Source : file printRoute/PrintPageBuilder.js at line 128

#cancelButton : HTMLElement

The cancel button on the toolbar

Source : file printRoute/PrintPageBuilder.js at line 93

#printButton : HTMLElement

The print button on the toolbar

Source : file printRoute/PrintPageBuilder.js at line 86

#printEL : PrintEL

Event listener for the print button

Source : file printRoute/PrintPageBuilder.js at line 121

#printRouteMapOptions : PrintRouteMapOptions

A reference to the PrintRouteMapOptions object containing the user choices

Source : file printRoute/PrintPageBuilder.js at line 58

#printToolbar : HTMLElement

The toolbar on right top of the screen

Source : file printRoute/PrintPageBuilder.js at line 79

#printViews : Array of PrintView

A reference to the views to print

Source : file printRoute/PrintPageBuilder.js at line 72

#route : Route

A reference to the printed route

Source : file printRoute/PrintPageBuilder.js at line 65

#routePolyline : LeafletObject

A leaflet.polyline used to represent the route on the maps

Source : file printRoute/PrintPageBuilder.js at line 114

#viewsCounter : Number

A counter for the views, so we can gives a unique id to the views

Source : file printRoute/PrintPageBuilder.js at line 100

#viewsDiv : Array of HTMLElement

An array with the HTML views

Source : file printRoute/PrintPageBuilder.js at line 107

Private methods

#createToolbar ( )

Creates the toolbar with the print and cancel button

Source : file printRoute/PrintPageBuilder.js at line 289

#createViewOnPage ( printView )

Creates a print view

Source : file printRoute/PrintPageBuilder.js at line 228

Parameters

Name Type Description
printView PrintView

The view to create

#getMapLayer ( )

Creates a leaflet layer with the same map that the main map

Source : file printRoute/PrintPageBuilder.js at line 169

#getNotesMarkers ( )

Creates markers for notes

Source : file printRoute/PrintPageBuilder.js at line 194