Repository navigation
fix: a shared Google Maps route navigates to its destination - #41
Merged
Merged
Conversation
Sharing directions from Google Maps sent the center of the route's map view (or, for coordinate stops, the start) to the watch. A /maps/dir/ link now yields its last stop: from ?destination=, a coordinate stop, the stop positions in the data part, or by geocoding the destination's name. Coordinates inside a link are no longer picked up as a plain-text place. Refs #12
The app's directions links give the stop positions as !3d<lat>!4d<lon>, not !1d<lon>!2d<lat>. Without them the destination's name was geocoded, which fails for business names unknown to OpenStreetMap. Tested on a phone: a route shared from Google Maps arrives on the watch with its destination.
Collaborator
Author
|
Tested with a real "Share directions" from the Google Maps app on the phone: the resolved link gives the destination as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while writing the help page: sharing directions from Google Maps did not send the destination.
/maps/dir/München/Zugspitze/@47.78,11.07,9z/data=…!1d10.9863!2d47.4211/maps/dir/<start lat,lon>/<dest lat,lon>//maps/dir/?api=1&destination=…/maps/dir/München/Zugspitze/@…(no positions)/maps/dir/link yields its last stop:?destination=, a coordinate stop, the stop positions in thedata=part (!1d<lon>!2d<lat>, last one), or the destination's name geocoded via Nominatim. The viewport is never used for directions.parse()no longer picks up coordinates inside a link as a plain-text place (that is how the viewport slipped through).Four new tests in TestSharedLocation; 3 of them fail without the fix. All 77 unit tests pass. Not yet tried with a real "Share directions" from the Google Maps app.
Refs #12
🤖 Generated with Claude Code