You can use the Launch()
function in a Canvas App to open Google Maps and navigate to a specific location entered by the user or stored in your data source.
📍 Example: Open Google Maps with a Destination
Launch("https://www.google.com/maps/search/?api=1&query=" & dc_Destination.Value)
🔍 Explanation
Launch()
: Opens a URL in the browser or map app on the user's device.- Google Maps URL: The
query
parameter lets you pass a place name or address. dc_Destination.Value
: A control (like a text input or data card) containing the location string.
✅ Use Case
Let’s say your app has a form where users input a delivery address, event location, or facility. You can add a “Navigate” or “View on Map” button to let users quickly view the location in Google Maps.
💡 Optional: Use EncodeUrl()
for Safer Results
Launch("https://www.google.com/maps/search/?api=1&query=" & EncodeUrl(dc_Destination.Value))
This ensures special characters in the address don’t break the URL.
Let me know if you'd like to include driving directions or current location-to-destination navigation!
No comments:
Post a Comment