# Showing addresses in Glide map component

**URL:** <https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980>\
**Category:** Project Showcase\
**Created:** [May 12, 2020, 4:32pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980 "2020-05-12T16:32:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Liebeschutz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_liebeschutz/32/3393_2.png) [@Dan\_Liebeschutz](https://community.glideapps.com/u/Dan_Liebeschutz)\
**Post date:** [May 12, 2020, 4:32pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/1 "2020-05-12T16:32:04Z")

</div>

Hi!

I don’t know if you had a problem with putting addresses in the map component, but for me, the location pins were showing everywhere but the place I was aiming for.

After figuring out how to make it work properly I wrote a very short story about it in Medium:

[https://medium.com/@danliebeschutz/how-to-make-addresses-show-correctly-in-glide-app-map-component-d0dcd8dcfba4](https://medium.com/@danliebeschutz/how-to-make-addresses-show-correctly-in-glide-app-map-component-d0dcd8dcfba4)

This is me trying to put 4 addresses in Tel Aviv:

Before:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/f/fb49dc3f3fd690cafefcb00f637ec8e84e3c395f.png)

After:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/9/94dd0ecdf0b100490c7374d3528e10979d47e23a.png)

Enjoy!

---

<div class="post-metadata">

**Author:** ![Julio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/julio/32/296_2.png) [@Julio](https://community.glideapps.com/u/Julio)\
**Post date:** [May 12, 2020, 6:12pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/2 "2020-05-12T18:12:22Z")

</div>

Thanks Dan!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 13, 2020, 1:31am UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/3 "2020-05-13T01:31:47Z")

</div>

Hi Dan, that’s a clever way of generating the component!

Love the integrated Google Script as well, I also used a script to generate the distance and travel time here.

> [@Concept for 5km delivery constraint & time taken to travel](https://community.glideapps.com/t/concept-for-5km-delivery-constraint-time-taken-to-travel/8946/):
>
> Hi Gliders, Inspired by this posts regarding how some businesses can’t offer a delivery outside their 5km radius. [https://community.glideapps.com/t/postcode-verification-before-purchasing-happy-to-hire-an-expert/8581](https://community.glideapps.com/t/postcode-verification-before-purchasing-happy-to-hire-an-expert/8581) I developed a solution to calculate distance between customer’s input address and the business’ fixed address. The use of postcode was proposed in some threads, but I don’t think it would have the same effect as taking the exact distance via Google. My test app link: [geocodetes…](http://geocodetest.glideapp.io)

---

<div class="post-metadata">

**Author:** ![Tim\_Sullivan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tim_sullivan/32/3461_2.png) [@Tim\_Sullivan](https://community.glideapps.com/u/Tim_Sullivan)\
**Post date:** [May 13, 2020, 2:40pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/4 "2020-05-13T14:40:13Z")

</div>

This is an awesome tip. I just added this script to one of my municipal apps where citizens can report illegal parking issues during a snowstorm. It seems to handle blocks, intersections, and specific addresses without an issue (so far).

Thanks Dan!

---

<div class="post-metadata">

**Author:** ![eltintero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eltintero/32/76520_2.png) [@eltintero](https://community.glideapps.com/u/eltintero)\
**Post date:** [May 13, 2020, 5:56pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/5 "2020-05-13T17:56:18Z")

</div>

This is pretty neat, dude! Congrats!

---

<div class="post-metadata">

**Author:** ![Mauricio\_Paz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mauricio_paz/32/17751_2.png) [@Mauricio\_Paz](https://community.glideapps.com/u/Mauricio_Paz)\
**Post date:** [May 13, 2020, 8:05pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/6 "2020-05-13T20:05:03Z")

</div>

Excellent your article, Dan. The solution I have used is to write the address on the map of the mapbox website ([https://docs.mapbox.com/search-playground/](https://docs.mapbox.com/search-playground/)). It gives you the correct way to write the address. Although some addresses cannot be found, in my case it has only been 10% of my searches.

I will test your formula with the addresses that I could not find. Thanks Dan.

---

<div class="post-metadata">

**Author:** ![Dan\_Liebeschutz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_liebeschutz/32/3393_2.png) [@Dan\_Liebeschutz](https://community.glideapps.com/u/Dan_Liebeschutz)\
**Post date:** [May 13, 2020, 9:17pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/7 "2020-05-13T21:17:55Z")

</div>

Wow! Great to hear it helped Tim! Thanks for the feedback 👍

---

<div class="post-metadata">

**Author:** ![Dan\_Liebeschutz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_liebeschutz/32/3393_2.png) [@Dan\_Liebeschutz](https://community.glideapps.com/u/Dan_Liebeschutz)\
**Post date:** [May 13, 2020, 9:20pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/8 "2020-05-13T21:20:13Z")

</div>

Thank you Mauricio! Please let me know here if it did help!

---

<div class="post-metadata">

**Author:** ![Dan\_Liebeschutz](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_liebeschutz/32/3393_2.png) [@Dan\_Liebeschutz](https://community.glideapps.com/u/Dan_Liebeschutz)\
**Post date:** [May 13, 2020, 9:20pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/9 "2020-05-13T21:20:50Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![StinsonOwner](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/stinsonowner/32/37079_2.png) [@StinsonOwner](https://community.glideapps.com/u/StinsonOwner)\
**Post date:** [July 14, 2020, 10:13pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/10 "2020-07-14T22:13:08Z")

</div>

Hey guys/gals, Im brand new here, and I have a google sheet with all of my club members addresses. They are in separate columns, street, city, state and zip.

They are as the original poster mentioned showing up all over the globe too.

So my question is this. I paid for the premium app, how does a non-coder like myself get this to work properly?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 14, 2020, 10:37pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/11 "2020-07-14T22:37:40Z")

</div>

Have you had the addresses as coordinates yet?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [July 15, 2020, 5:46am UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/12 "2020-07-15T05:46:30Z")

</div>

Coordinates are best and most reliable, but if you use addresses, you need to make sure the entire address is in one column. If your address consists of multiple columns and you can only point the map to one of those columns, then it’s expected to have erratic results. Either use a formula in the sheet or use a template column in the Glide data editor to join all the address columns into one complete address column.

---

<div class="post-metadata">

**Author:** ![garrison](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garrison/32/22059_2.png) [@garrison](https://community.glideapps.com/u/garrison)\
**Post date:** [July 15, 2020, 8:11am UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/13 "2020-07-15T08:11:38Z")

</div>

@StinsonOwner: The first task is to use a formula to build the address in a new cell with comma separated values, i.e. street, city, state, zip.

Once you have that, you will be able to convert the new address cell into lon/lat coordinates using the add-on Geocode for Awesome Table.

For more accurate map pins, coordinates are the best choice and the above method will get your there in no time.

---

<div class="post-metadata">

**Author:** ![Ofer\_Chama](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ofer_chama/32/9007_2.png) [@Ofer\_Chama](https://community.glideapps.com/u/Ofer_Chama)\
**Post date:** [August 1, 2020, 7:51am UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/14 "2020-08-01T07:51:57Z")

</div>

@Dan_Liebeschutz thank you for this - it works perfectly!

I am having an issue with the script though and was wondering whether you have an idea how to solve it:

I use array formula to apply the formula to new rows. Every time a new row is added, the formula re-calculates the entire column’s coordinates which causes:

a. some down time before Glide refreshes and shows the pins on the map. This means that maps are not shown for a couple of minutes when a new row is added.  
b. “Exception: Service invoked too many times for one day: geocode. (line 11).” - since my app is sending hundreds of requests each day, I reached a limit I wasn’t aware of.

I think it would be great if newly added rows would use geolocation for themselves only without recalculating the entire column. Any idea how to do that?

Thank in advance!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [August 1, 2020, 4:03pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/15 "2020-08-01T16:03:22Z")

</div>

This is best with a script, but also make sure your script is set to only get coordinates if the coordinates haven’t already been retrieved.

---

<div class="post-metadata">

**Author:** ![Ofer\_Chama](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ofer_chama/32/9007_2.png) [@Ofer\_Chama](https://community.glideapps.com/u/Ofer_Chama)\
**Post date:** [August 1, 2020, 4:16pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/16 "2020-08-01T16:16:54Z")

</div>

Thanks Jeff, I currently use a script that creates a custom formula, then apply it to the address column using array formula. The array formula recalculates the entire column every time a new row is added, which is the issue.

I don’t know how to write code (that’s why I’m here 😉) so I asked a friend to help but he couldn’t figure it out 😕

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 1, 2020, 5:29pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/17 "2020-08-01T17:29:47Z")

</div>

Maybe I will try this next week when I have time. The idea is the same as yours, but add in that after the calculation we copy the final value and paste it back into the cell so it won’t recalculate again every time a new formula is added.

---

<div class="post-metadata">

**Author:** ![Ofer\_Chama](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ofer_chama/32/9007_2.png) [@Ofer\_Chama](https://community.glideapps.com/u/Ofer_Chama)\
**Post date:** [August 1, 2020, 6:05pm UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/18 "2020-08-01T18:05:36Z")

</div>

@ThinhDinh that would be appreciated, thank you!

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [August 2, 2020, 4:49am UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/19 "2020-08-02T04:49:13Z")

</div>

I’m working on app where I have already successfully managed to achieve the following:

1. Get user to enter either post code or use current location.
2. Get driver to do as User in 1 above.
3. Show pick up point and drop off point. Here i show both coordinates and addresses for the same.
4. Show distance to driver
5. Show distance from pick up to drop off  
6 show price by mile
6. Not use time as roads have different speed zones and traffic was another issue but have included the formula.

My template is now out of the production stage.

Now, addressing your problem.

1. I experienced exactly what you are experiencing.
2. I’m sure you are using getAdress and/or either geoode yandex or google. I prefer yandex as I miss can make more calls on it than I can on google.
3. Get rid of the array formula if you are using a script as you would have to. Instead use a copydown script. That gets rid of the recalculation of the coordinates each time a new row is added.
4. If you need to split the coordinates to get the address, use an arrayformula with iferror. For this you will not need a script. I use both text join and split to make sure both ends are tied.

Hope it woks for you as it has for me. When I showcase my app, you can it all in action.

Have a good day.

---

<div class="post-metadata">

**Author:** ![Ofer\_Chama](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ofer_chama/32/9007_2.png) [@Ofer\_Chama](https://community.glideapps.com/u/Ofer_Chama)\
**Post date:** [August 2, 2020, 8:43am UTC](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980/20 "2020-08-02T08:43:31Z")

</div>

That’s exactly the solution I am looking for - thanks @Wiz.Wazeer!

The part I’m having trouble with is #3 in your solution, I’m not sure how to create a copydown script. For the matter, I am using the script below to create a custom formula, which is implemented in a sheet called “Homes”. Column I contains the full address entered by the user, column J should return the coordinates using the custom formula.

```
function myFunction() {
  
}

function GEOCODE_GOOGLE(address) {
  if (address!=""){
    if (address.map) {
      return address.map(GEOCODE_GOOGLE)
    }
    else {
        var r = Maps.newGeocoder().geocode(address)
        for (var i = 0; i < r.results.length; i++) {
            var res = r.results[i]
            return res.geometry.location.lat + ", " + res.geometry.location.lng
        }
    }
  }
}
```

[Next page](https://community.glideapps.com/t/showing-addresses-in-glide-map-component/8980.md?page=2)
