This article explains how to dynamically insert GPS locations into your PDF templates using the map view images of drop pins captured through submissions in Clappia apps.
Use Cases
Including field team location details in reports.
Attaching customer visit locations to inspection reports.
Logging delivery or task completion locations.
Any process requiring dynamic insertion of a map view with pins into PDF documents.
Configuring PDFs
To dynamically include GPS location data in your PDFs:
Add a Location Block in Your App:
For capturing GPS location map images into PDFs, a GPS Location block or Live Tracking block needs to be added to the app.
Setup Print Settings:
Go to Design App > Configuration > Print Settings.
Add a new print template by clicking Add Print Template, then give your template a name.
Click the Edit icon to open the PDF design editor.
Click here to know more about setting print templates.
Insert GPS Locations from Submissions:
In the editor, click on the Insert Map from Submissions icon in the toolbar.
A pop-up window will appear.
From the Select Field Name to Insert dropdown, choose the GPS Location or Live Tracking field added in your app.
Specify any additional parameters:
Height and Width to adjust the size of the map image.
Insert Section Index for copyable sections (if applicable).
Click Save to insert the map image variable (e.g., {location#gps}) into the template.
Previewing the PDF
Navigate to the App Home tab and open the Submissions tab.
Click on a submission, and a right panel will appear. Click the PDF icon to view the dynamically generated PDF in print preview.
The PDF will display the map view of the GPS location with drop pins based on the submission data.
Dynamic Printing of GPS Locations from Copyable Sections
If you have a copyable section in your app with a GPS Location block:
Use the Insert Map from Submissions option as explained above.
In the pop-up, enter the Section Index to specify which copyable section's GPS data to include. For example, if you need the location of the first section, type in 1, if you need the second location of the copied section, type in 2, and so on.
If you have, let say 3 copies of a section, variables inserted will look like {location#gps#1}, {location#gps#2}, etc.
The PDF will dynamically include maps for all configured sections based on the submission data on the submission data.
In case you do not want the static image of maps in the PDFs and may require only GPS coordinates, then in the template, simply type in “@” followed by the GPS block’s name or the live tracking block’s name.
Notes
The feature only works if a GPS Location or Live Tracking block has been added to the app.
Ensure accurate data submission by enabling GPS permissions for users on their devices.
Maps inserted will represent the submitted location accurately with a pin drop image.
FAQs
Try our free plan
It will answer many more questions within just 15 minutes.