work from bae
This commit is contained in:
parent
0c98ad90a6
commit
d34878fc5e
7 changed files with 204 additions and 8 deletions
|
|
@ -39,9 +39,13 @@ class MIHLocationAPI {
|
|||
}
|
||||
}
|
||||
|
||||
double getDistanceInMeaters(Position startPosition, Position endPosition) {
|
||||
return Geolocator.distanceBetween(startPosition.latitude,
|
||||
startPosition.longitude, endPosition.latitude, endPosition.longitude);
|
||||
double getDistanceInMeaters(String startPosition, String endPosition) {
|
||||
double startLatitude = double.parse(startPosition.split(", ")[0]);
|
||||
double startLogitude = double.parse(startPosition.split(", ")[1]);
|
||||
double endLatitude = double.parse(endPosition.split(", ")[0]);
|
||||
double endLogitude = double.parse(endPosition.split(", ")[1]);
|
||||
return Geolocator.distanceBetween(
|
||||
startLatitude, startLogitude, endLatitude, endLogitude);
|
||||
}
|
||||
|
||||
void showPermissionError(BuildContext context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue