fix MyLocationPage&LimitMapBoundsPage mis-match

This commit is contained in:
Kuloud
2024-06-27 16:04:43 +08:00
parent 61202ada16
commit 2c3e525b32
5 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,17 @@
part of amap_map;
bool isLocationValid(AMapLocation location) {
final LatLng latLng = location.latLng;
if (latLng.latitude < -90 ||
latLng.latitude > 90 ||
latLng.longitude < -180 ||
latLng.longitude > 180) {
return false;
}
if (location.accuracy < 0) {
return false;
}
return true;
}