-
Notifications
You must be signed in to change notification settings - Fork 522
Open
Description
computeLatitudePrecision uses a wrong logic:
open-location-code/java/src/main/java/com/google/openlocationcode/OpenLocationCode.java
Line 683 in bb54a57
| if (codeLength <= CODE_PRECISION_NORMAL) { |
Instead, it should compare
codeLength <= PAIR_CODE_LENGTH
The two constants have different semantics, but the same value (namely 10). So this issue is about code cleanness, not about a wrong run-time behavior.
When fixed, CODE_PRECISION_NORMAL would just determine the default precision for the two-parameter encode. It might then be increased to 11 to match the OLC precision shown by Google Maps for pins, which is about the GPS accuracy in phones.
Metadata
Metadata
Assignees
Labels
No labels