feat(search): accept a typed coordinate as a "Go to" result#23
Merged
Conversation
Search now recognises a latitude/longitude typed in any common notation and offers a "Go to coordinate" hit pinned to the top of the results, so Enter jumps straight there. Lenient about how it's entered: - decimal degrees "-32.4943, 60.931" "32.4943 S 60.931 E" - degrees-decimal-minutes "32°29.66'S, 060°55.86'E" "39°27.6′N 104°39.6′W" - degrees-minutes-seconds "32 29 40 S 60 55 52 E" °/′/″ marks optional (plain ' and " accepted), hemisphere by N/S/E/W (either case) or a leading −, lat/lon separated by comma/semicolon or whitespace. New util.parseLatLon is the inverse of fmtLatLon (round-trips); non-coordinates and out-of-range values fall through to the normal chart/feature search. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Search now recognises a latitude/longitude typed in any common notation and offers a "Go to coordinate" hit pinned to the top of the results, so Enter jumps straight there. Lenient about how it's entered:
°/′/″ marks optional (plain ' and " accepted), hemisphere by N/S/E/W (either case) or a leading −, lat/lon separated by comma/semicolon or whitespace. New util.parseLatLon is the inverse of fmtLatLon (round-trips); non-coordinates and out-of-range values fall through to the normal chart/feature search.