-
-
Notifications
You must be signed in to change notification settings - Fork 134
Plus Codes #5116
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
base: master
Are you sure you want to change the base?
Plus Codes #5116
Conversation
432ef53 to
7a6f241
Compare
ee8173e to
41691c5
Compare
76fe575 to
714a74d
Compare
714a74d to
8bb5612
Compare
|
Check whats wrong with tests |
| } | ||
|
|
||
| // Check if the input is a plus code - takes priority over all adapters | ||
| const plusCodeMatch = value.match(/\b[23456789CFGHJMPQRVWX]{2,8}\+[23456789CFGHJMPQRVWX]{2,4}\b/i) |
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.
I found other regexps in the documentation.
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.
Oh yep, it seems a bit more precise, ty
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.
| } | ||
|
|
||
| // Check if the input is a plus code - takes priority over all adapters | ||
| const plusCodeMatch = value.match(/\b[23456789CFGHJMPQRVWX]{2,8}\+[23456789CFGHJMPQRVWX]{2,4}\b/i) |
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.
Why not use OpenLocationCode.isValid here?
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.
The isValid don't allow to check for a specific resolution. You can use a very low resolution for example 1km² and will still be valid.. since this resolution is in the plus codes spec

Uh oh!
There was an error while loading. Please reload this page.