Greetings to all!
I am designing an internal application for my work group. For one of the archives in use, I used the tabbed view, because it collects for me in a more graphic and beautiful way, the information that needs to be displayed. The top of the tab, is a graphic map corresponding to the street of the building, obtained with an automatic script via Airtable. It is then displayed in hero mode, at the top. It would be a nice thing, to have the possibility by clicking it, to open Google Maps or similar based on the street represented by the map in question. Do you have any suggestions? Consider that clicking on the map, it displays the map itself enlarged and the address composed as follows as an example - VIA-ALDO-MORO,32—00048-NETTUNO-(RM). Thank you to anyone who will answer me and give me a small part of their precious time!
Sincerly
Hey @Profxeni
Great question!
I wasn’t 100% sure how to do this myself, so I asked ChatGPT
It’s surprisingly easy though
To create a Google Maps URL that directly navigates to a specific address, you can use the following format:
Format:
https://www.google.com/maps/dir/?api=1&destination=ADDRESS
Replace ADDRESS
with the specific location you want to navigate to. The address should be URL encoded (i.e., spaces should be replaced with %20
, and other special characters should be properly encoded).
Example:
If you want to create a Google Maps URL to navigate to “1600 Amphitheatre Parkway, Mountain View, CA”, the URL would look like this:
https://www.google.com/maps/dir/?api=1&destination=1600%20Amphitheatre%20Parkway,%20Mountain%20View,%20CA
When someone clicks on this URL, it will open Google Maps with the destination set to “1600 Amphitheatre Parkway, Mountain View, CA”, ready for navigation.
In Practice
- Setup a formula field using your address
- In your formula, use
ENCODE_URL_COMPONENT
(Source) to encode the address you have in a URL component - Add that to the end of
https://www.google.com/maps/dir/?api=1&destination=
I thank you for the answer that certainly wasted your valuable time, as was the answer that I hope will be helpful to other friends as well, but my question was whether it was possible to click on the image and thus take advantage of this ad-hoc created URL and in general whether, if not available, whether provided in the “things to do.” In short, some kind of image that simulates a button and thus an action.
Greetings
Riccardo
Have you considered adding an iframe to your page using the Google Maps Embed API? This provides an interactive map + allows users to click “view larger map”
Hello,
yes I considered all the possibilities, but I was hoping for a simple thing that is not there yet, though: a link to be associated with pressing an image, in this case of the map. I will associate the navigation with a CTA button. Thanks for the advice!
Regards