Handle incomplete lat/long values
This commit is contained in:
parent
416fc58053
commit
bdb853ebd6
1 changed files with 3 additions and 0 deletions
|
@ -209,6 +209,9 @@ class GPSData {
|
|||
if (lat == null || long == null) {
|
||||
return null;
|
||||
}
|
||||
if (lat!.length < 3 || long!.length < 3) {
|
||||
return null;
|
||||
}
|
||||
final latSign = (latRef ?? 'N') == "N" ? 1 : -1;
|
||||
final longSign = (longRef ?? 'E') == "E" ? 1 : -1;
|
||||
return Location(
|
||||
|
|
Loading…
Add table
Reference in a new issue