Hi folks. I am creating a work order management / job tracking app for my remote crews who repair municipal sidewalks.
I cannot for the life of me figure out how to add a Google Maps lookup to the Jobs database.
Location doesn’t seem to be a data or form element? Am I missing something?
Can you explain what you mean by “Google Maps lookup”?
Location is a component to collect the user’s location in coordinates form, but it is static and won’t update over time.
1 Like
Maybe @jgliftoff means he cannot figure out how to display location pins on a map?
If this is the case: create a liste or inline list, and set the display layout type to map
.
Map layout
1 Like
Hello @nathanaelb and @ThinhDinh and thanks for the replies! I am trying to achieve the latter - pins on a map. But before I get to the display, I am trying to figure out how I can get an address field using Glide Tables (see image)
I would like to have a specific address for each row, and display the map on the details page in the web app. Do I need to capture the address fields (Unit, Street, City, Region, Country, Code) separately?
Thanks again.
I call it a Google Maps Lookup as I was thinking about the form input - I would love to have the standard Google ‘type-ahead’ functionality.
So you’re letting the users fill that themselves? To make it easier, I think it should be a single field.
This is, to be clear, not easy to achieve. Please follow the tutorial below to use the Geoapify API.
2 Likes
Thanks @ThinhDinh, I appreciate the clarity. I’m looking for easy to achieve Going to have to sacrifice the form experience and just focus on the data.
You’re on the right path. To keep it simple, here’s how I would approach it:
- Input an address manually in your Glide Table, in a text basic column. Check if the pin displays on the map. “Eg. 100 boulevard Leclerc, Paris” or is the zip code required.
- In the builder, on your screen, include a text input component that writes to the text column in 1. Now your setup should work.
- Your setup in prone to error, to improve it:
3a. In your table, instead of one text column, create multiple: street, zip, city (for instance). Join this data in a final column called “Full address”, this column is a template column.
3b. Instead of one text input component, create multiple: street, zip, city. Make “required” as needed. Now your “Full address” column should be populating with the data submitted.
- Your setup in 3 is now better, but it is still prone to error because it is not validating the existence of the address. Use Thinh’s method with a 3rd party geo API that validates in real time your address and suggests the correct format.