Class PrintViewsFactory

Compute the size of the views for printing

Source : file printRoute/PrintViewsFactory.js at line 34

Constructor

new PrintViewsFactory ( route, maxViewSize )

The constructor

Source : file printRoute/PrintViewsFactory.js at line 359

Parameters

Name Type Description
route Route

The route to print

maxViewSize ViewSize

The view size

Public getters and setters

readonly get printViews : Array of PrintView

The print views

Source : file printRoute/PrintViewsFactory.js at line 371

Private properties

#maxViewSize : ViewSize

The greatest possible view size

Source : file printRoute/PrintViewsFactory.js at line 55

#printViews : Array of PrintView

An array with rhe computed views

Source : file printRoute/PrintViewsFactory.js at line 41

#route : Route

A reference to the printed route

Source : file printRoute/PrintViewsFactory.js at line 48

Private methods

#computeIntermediatePoint ( currentView, firstItineraryPoint, lastItineraryPoint )

See comments in the code

Source : file printRoute/PrintViewsFactory.js at line 148

Parameters

Name Type Description
currentView PrintView

The current view

firstItineraryPoint ItineraryPoint

The first ItineraryPoint

lastItineraryPoint ItineraryPoint

The last ItineraryPoint

Returns

The computed point
Type : LatLng

#computePrintViews ( )

Compute the different views needed to print the maps

Source : file printRoute/PrintViewsFactory.js at line 262

#haveViewOnlyOnePoint ( currentView, firstItineraryPoint, lastItineraryPoint )

Test if currentView is only a point. If yes an intermediatePoint is computed to extend the view to the maximun possible

Source : file printRoute/PrintViewsFactory.js at line 122

Parameters

Name Type Description
currentView PrintView

The current view

firstItineraryPoint ItineraryPoint

The first ItineraryPoint

lastItineraryPoint ItineraryPoint

The last ItineraryPoint

Returns

The coordinates of the computed intermediate point or null
Type : LatLng

#isItineraryHorOrVer ( currentView, firstItineraryPoint, lastItineraryPoint )

Compute if the line defined by firstItineraryPoint lastItineraryPoint is horizontal or vertical. If yes, the intersection of the line and currentView is returned

Source : file printRoute/PrintViewsFactory.js at line 66

Parameters

Name Type Description
currentView PrintView

The current view

firstItineraryPoint ItineraryPoint

The first ItineraryPoint

lastItineraryPoint ItineraryPoint

The last ItineraryPoint

Returns

The coordinates of the intersection or null if the line is not horizontal or vertical.
Type : LatLng

#isPointOnViewFrame ( currentView, itineraryPoint )

Test if itineraryPoint is on the frame of currentView

Source : file printRoute/PrintViewsFactory.js at line 93

Parameters

Name Type Description
currentView PrintView

The current view

itineraryPoint ItineraryPoint

The ItineraryPoint to test

Returns

The coordinates of itineraryPoint or null if the itinerayPoint is not on the frame
Type : LatLng