Help with geocode data

I was looking at the help docs for the map custom widget:

towards the bottom there is this bit:


when i try it out it doesnt seem to work. and i cant tell if its trying anything at all.

So I created a formula to generate a URL using address info in my project and i can click on the generated URL to get the latitude and longitude data from nominatim.org is there a way to make this a button press like the grist sample supposedly does or a formula/api to accomplish the same? so i dont have to manually enter that data.

It looks like you may have stumbled across an issue the same time as SevereOverfl0w, who submitted a fix that was just merged. This change should be live now, so please try again using Geocode to see if it works.

to be clear, i click on the grist map example:

and then I navigate to the Geocoding menu/page, enter a city and state (Los Angeles, California) and click on the toggle. Nothing happens. And i dont see any code behind it either. Also the map widget is not configured correctly either. i just want to know the code behind whatever retrieves the latitude and longitude from a city/state etc…

Hey @Mr-Rooj !

Apologies for the configuration problems! I have updated the example so it should be fixed now.

https://public.getgrist.com/3boQPJrgFmFi/Large-in-America

The map widget has to be configured in order for the geocoding to work. Since it wasn’t configured, it wasn’t geocoding the address you added. Now, when you navigate to the Geocoding page, you’ll notice the map is configured. You can add a City and State and click the toggle and the Lat/Long coordinates will be returned as initially expected.


Our Custom Widgets webinar walks through how to set this up step-by-step. This link will start the webinar where we begin discussing the map widget: https://www.youtube.com/watch?v=zNLHX_ezY50&list=PL3Q9Tu1JOy_4p4g-uS_3LQrB_3Vm7CWe4&index=33&t=713s

You can see the code for the widget, which does the geocoding, here: grist-widget/map at master · gristlabs/grist-widget · GitHub

Please let me know if you have any questions!

Thanks,
Natalie

i cant edit that shared doc but i was able to get it working on my side. thanks!