feat: partial broken guesture detection

This commit is contained in:
2024-04-20 21:14:11 +02:00
parent be359980bb
commit b7487fc25e
9 changed files with 3670 additions and 1369 deletions

View File

@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:anyhow/anyhow.dart';
import 'package:geojson/geojson.dart';
import 'package:geojson_vi/geojson_vi.dart';
import 'package:get/get.dart';
import 'package:uninav/data/geo/model.dart';
import 'package:uninav/data/geo/parser.dart';
@ -46,14 +46,17 @@ class MyMapController extends GetxController {
final featuresList = <Feature>[];
final geojson = GeoJson();
await geojson.parse(geoJsonString);
print('doing');
final geojson = GeoJSONFeatureCollection.fromJSON(geoJsonString);
print('done');
for (final feature in geojson.features) {
print(feature);
print(feature?.properties);
if (feature == null) continue;
print(feature.properties);
final parsed =
parseFeature(feature.properties ?? <String, dynamic>{}, feature);
final parsed = parseFeature(
feature.properties ?? <String, dynamic>{}, feature.geometry);
if (parsed case Ok(:final ok)) {
featuresList.add(ok);
}