Methods
(inner) createPdf(map, item, callback, resolution, format, rotation)
Creates a PDF of the given map including a footer.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
map |
Object | The ol map to create a pdf of. | |
item |
Object | The item that is shown on the map. | |
callback |
function | The callback function called with the jsPDF as the first parameter and the file name as the second. | |
resolution |
number | 300 | The resolution of the PDF. |
format |
String | a4 | The format of the PDF, supports a0 to a5. |
rotation |
String | landscape | The rotation of the PDF either 'landscape' or 'portrait'. |
(inner) drawFooterContent()
Draws a custom image footer
(inner) formatDate(date)
Formats a date to match the required specifications of dd.mm.yy hh:MM
Parameters:
Name | Type | Description |
---|---|---|
date |
Date | The Date object to format |
Returns:
The formated date
(inner) generateFileName(item) → {String}
Generates a file name with the following syntax: 'Skraafoto_{vejnavn}_{husnr}_{postnr}_{postnavn}_{date}
Where the date is the date when the photo was taken in the format DDMMYY
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | The item to generate a file name for. |
Returns:
The generated file name.
- Type
- String
(inner) getAddressObject() → {Object}
Gets the address as an object, split into road_name, house_number, post_number, and post_name.
Returns:
- Type
- Object