mirror of
https://github.com/TrentSPalmer/libre_gps_parser.git
synced 2024-12-22 09:12:50 -08:00
implement truncate gps coord precision to 7 decimal places
This commit is contained in:
parent
7e435afe20
commit
d0395df257
@ -2,3 +2,7 @@
|
|||||||
ea3f466315375d1f0eea49c0a224b36bcce8517f6ca45c6c2ed558015a97c21a libre_gps_parser/0.1.3/armv9/app-release.apk
|
ea3f466315375d1f0eea49c0a224b36bcce8517f6ca45c6c2ed558015a97c21a libre_gps_parser/0.1.3/armv9/app-release.apk
|
||||||
cb45d4e5ac5f2a71ccd2ad9a2c4c081725fe2d65dd5db7a95bd196f3be70b108 libre_gps_parser/0.1.3/arm64v10/app.aab
|
cb45d4e5ac5f2a71ccd2ad9a2c4c081725fe2d65dd5db7a95bd196f3be70b108 libre_gps_parser/0.1.3/arm64v10/app.aab
|
||||||
6f145facdf75c83d42bf6ab76a3e27166eac75b0557a990634659944f031a0b9 libre_gps_parser/0.1.3/arm64v10/app-release.apk
|
6f145facdf75c83d42bf6ab76a3e27166eac75b0557a990634659944f031a0b9 libre_gps_parser/0.1.3/arm64v10/app-release.apk
|
||||||
|
eddc2f07cd8aaf710cdebeead84b1c5d6b82312b4a099bd6cb09372713f0ddd3 libre_gps_parser/0.1.4/armv11/app.aab
|
||||||
|
8c32da0c647d3b464678fe327cffe3a6750e402088552fcee7fa16b8789ecb02 libre_gps_parser/0.1.4/armv11/app-release.apk
|
||||||
|
9bef42c7919074e3661c8680cb69aa786102c4df47495dd4731efff163a8ed9b libre_gps_parser/0.1.4/arm64v12/app.aab
|
||||||
|
21460b736f6045e569443db8cdac7942c352085b3222628d100814dd5a7217d5 libre_gps_parser/0.1.4/arm64v12/app-release.apk
|
||||||
|
@ -55,7 +55,7 @@ InkWell aboutApp(BuildContext context) {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
'Version: 0.1.3\n',
|
'Version: 0.1.4\n',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: candyApple,
|
color: candyApple,
|
||||||
),
|
),
|
||||||
|
@ -256,6 +256,17 @@ int newTimeStamp() {
|
|||||||
return (date.millisecondsSinceEpoch / 1000).floor();
|
return (date.millisecondsSinceEpoch / 1000).floor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String _latLongShortener(String latLong) {
|
||||||
|
List<String> _splitLatLong = latLong.split(',');
|
||||||
|
List<String> _splitLat = _splitLatLong[0].split('.');
|
||||||
|
List<String> _splitLong = _splitLatLong[1].split('.');
|
||||||
|
String result = _splitLat[0] + '.';
|
||||||
|
result += ((_splitLat[1].length > 6) ? _splitLat[1].substring(0, 7) : _splitLat[1]);
|
||||||
|
result += ',' + _splitLong[0] + '.';
|
||||||
|
result += ((_splitLong[1].length > 6) ? _splitLong[1].substring(0, 7) : _splitLong[1]);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
Future<String> parseMapUrl(String mapUrl) async {
|
Future<String> parseMapUrl(String mapUrl) async {
|
||||||
if (mapUrl.contains('mapq.st')) {
|
if (mapUrl.contains('mapq.st')) {
|
||||||
try {
|
try {
|
||||||
@ -268,7 +279,7 @@ Future<String> parseMapUrl(String mapUrl) async {
|
|||||||
r'(<meta)\s*(property="place:location:longitude")\s*(content=")(.+)"\s*(/>)');
|
r'(<meta)\s*(property="place:location:longitude")\s*(content=")(.+)"\s*(/>)');
|
||||||
Match _longMatch = _longExp.firstMatch(mapInfo);
|
Match _longMatch = _longExp.firstMatch(mapInfo);
|
||||||
String result = _latMatch.group(4) + ',' + _longMatch.group(4);
|
String result = _latMatch.group(4) + ',' + _longMatch.group(4);
|
||||||
return (result);
|
return _latLongShortener(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(
|
print(
|
||||||
'$e can\'t connect to internet in global_helper_functions.parseMapUrl');
|
'$e can\'t connect to internet in global_helper_functions.parseMapUrl');
|
||||||
@ -285,7 +296,7 @@ Future<String> parseMapUrl(String mapUrl) async {
|
|||||||
RegExp subGmapUrl = RegExp(r'@([^,]*,[^,]*),([^,]*,[^,]*)');
|
RegExp subGmapUrl = RegExp(r'@([^,]*,[^,]*),([^,]*,[^,]*)');
|
||||||
Match subMatch = subGmapUrl.firstMatch(subMapInfo);
|
Match subMatch = subGmapUrl.firstMatch(subMapInfo);
|
||||||
String result = subMatch.group(1);
|
String result = subMatch.group(1);
|
||||||
return (result);
|
return _latLongShortener(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(
|
print(
|
||||||
'$e can\'t connect to internet in global_helper_functions.parseMapUrl');
|
'$e can\'t connect to internet in global_helper_functions.parseMapUrl');
|
||||||
|
@ -11,7 +11,7 @@ description: A new Flutter project.
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 0.1.2+10
|
version: 0.1.2+12
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.1.0 <3.0.0"
|
sdk: ">=2.1.0 <3.0.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user