Generate Static Map Image
This snippet will show you how to generate a static map image.
- Not yet re-checked
- Classic builder
Moved from our previous help site and not yet re-checked against the current product. Last edited Sep 20, 2024.
This snippet will show you how to generate a static map image.
Step 1
To start, add a Text Formula to any table that has an Address field. The text formula will be made up of the following parts
https://maps.googleapis.com/maps/api/staticmap?center=- Add Field > Address - Address field.
&zoom=13&size=600x300&maptype=roadmap&markers=color:red%7Clabel:%7C- Add Field > Address - Latitude
,- Add Field > Address - Longitude
&key=YOUR_GOOGLE_API_KEY(You can create an API key in the Google Developers Console 1.)
The result should look like this.
https://maps.googleapis.com/maps/api/streetview?size=1800x1800&location=- Add Field > Address - Address
- Add Field > Address - City
- Add Field > Address - State
- Add Field > Address - Country
&source=outdoor&key=YOUR_GOOGLE_API_KEY
Step 2
To add this to your List component, you may add the following to HTML inside a List. (Change field_id to the Text Formulas field slug)
<p><img src="{!!field_id!!}" alt="" width="100%" /></p>
Step 3
To add this to a PDF, add an HTML Component and the following to the Source Code.
<p><img src="{!!Text Formula!!}" alt="" /></p>
<p style="display: none;">{Text Formula}</p>
Original Community Post:
Generate static map image - Community Discussions / Tips and Tricks - Tadabase Community
Was this page helpful?
Something wrong or missing on this page? Tell us.