-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GeoURI to drop a pin when opened with Google Maps #990
Conversation
@@ -907,7 +907,7 @@ | |||
}, | |||
{ | |||
"name": "GeoURI", | |||
"url": "geo:{x},{y}" | |||
"url": "geo:{x},{y}?q={x},{y}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TurtIeSocks I'm assuming you can use the replacement variables multiple times in a pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not currently but if you change
href={url.replace('{x}', lat.toString()).replace('{y}', lon.toString())} |
to use
replaceAll
instead of replace
(or a regex) then it shouldn't be a problem.
Thanks for the PR but can you change the target to |
give me a second to rebase and remove the other changes that are from master :) |
Wikipedia lists an unofficial extension using the `q` parameter to have Google Maps show a pin from a GeoURI. See: https://en.wikipedia.org/wiki/Geo_URI_scheme#Unofficial_extensions I tested this on Android Google Maps and opening the link directly through the Tesla app. I also tested the url pattern: `geo:0,0?q={x},{y}`, but opted to go with the committed pattern to account for external maps that may not recognize the `q` parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you for the contribution!
🎉 This PR is included in version 1.32.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Wikipedia lists an unofficial extension using the
q
parameter to have Google Maps show a pin from a GeoURI. See: https://en.wikipedia.org/wiki/Geo_URI_scheme#Unofficial_extensionsI tested this on Android Google Maps and opening the link directly through the Tesla app.
I also tested the url pattern:
geo:0,0?q={x},{y}
, but opted to go with the committed pattern to account for external maps that may not recognize theq
parameter