GCWizard
GCWizard copied to clipboard
Coordinate Parse: Convertion will be done twice
Example:
OpenLocationCode.parse(input)
calls parseOpenLocationCode -> calls openLocationCodeToLatLon just for parsing.
Then it must be converted to LatLng with
OpenLocationCode.toLatLng
which calls openLocationCodeToLatLng for the second time...
Needs enhancement!
I don't see a real problem or alternative. With parse only the text (input) is accepted. With openLocationCodeToLatLon it is then checked whether valid coordinates can really be determined from this text. If not, null is returned.
Doesnt it makes sense, if on parsing a valid coord appears, to store it in the object. So it can be used later in toLatLon
But then with this format (and with others) we would have to store 2 data and keep them synchronized. The original text and LatLng. The original input should also be retained. I don't think it's useful or necessary.
hm... i don't like it. But it's not high priority. Let's pospone it...
Even worse: Parsing takes on place ever widget change I learned yesterday