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.

Screenshot for “Generate 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

  1. https://maps.googleapis.com/maps/api/staticmap?center=
  2. Add Field > Address - Address field.
  3. &zoom=13&size=600x300&maptype=roadmap&markers=color:red%7Clabel:%7C
  4. Add Field > Address - Latitude
  5. ,
  6. Add Field > Address - Longitude
  7. &key=YOUR_GOOGLE_API_KEY (You can create an API key in the Google Developers Console 1.)
Screenshot for “Generate Static Map Image”

The result should look like this.

Screenshot for “Generate Static Map Image”
  1. https://maps.googleapis.com/maps/api/streetview?size=1800x1800&location=
  2. Add Field > Address - Address
  3. Add Field > Address - City
  4. Add Field > Address - State
  5. Add Field > Address - Country
  6. &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)

Text
<p><img src="{!!field_id!!}" alt="" width="100%" /></p>
Screenshot for “Generate Static Map Image”

Step 3

To add this to a PDF, add an HTML Component and the following to the Source Code.

Text
<p><img src="{!!Text Formula!!}" alt="" /></p>
<p style="display: none;">{Text Formula}</p>
Screenshot for “Generate Static Map Image”

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.