organicmaps icon indicating copy to clipboard operation
organicmaps copied to clipboard

Allow Google Maps formatted plus codes

Open ericmedina024 opened this issue 1 year ago • 1 comments

Google Maps includes some region information in their plus codes. For example: HMPG+54 Four Corners, Montana C2HX+6M, Ranjangaon, Maharashtra 424101, India

Currently, in order to use these codes in Organic Maps you have to manually delete the region portion each time. This PR allows Organic Maps to accept the format used by Google Maps. As far as I can tell, these are not valid Open Location Codes but I thought it'd still be handy to have.

ericmedina024 avatar Aug 02 '24 23:08 ericmedina024

Thanks for the contribution! Could you please add some basic unit tests? Otherwise it is hard to say that all cases work as expected.

rtsisyk avatar Aug 03 '24 07:08 rtsisyk

Unfortunately, the approach I was taking here doesn't actually work. It seems this format is not easily parseable without knowing the location of the region provided after the plus code. Without that context, the X code is ambiguous.

ericmedina024 avatar Nov 17 '24 21:11 ericmedina024