Kml, kmz és geojson import és térképi megjelnítésük.

This commit is contained in:
2026-06-21 10:07:35 +02:00
parent 0828630a5b
commit 7c29bc7ae5
14 changed files with 1095 additions and 13 deletions
@@ -43,6 +43,7 @@ import 'package:terepi_seged/services/gnss/gnss_device_service.dart';
import 'package:terepi_seged/services/gnss/gnss_service.dart';
import 'package:terepi_seged/services/ntrip_service.dart';
import 'package:terepi_seged/services/project_service.dart';
import 'package:terepi_seged/widgets/map/imported_layer_overlay.dart';
import 'package:terepi_seged/widgets/map_edit_tools/map_feature_save_sheet.dart';
import 'package:terepi_seged/widgets/shared_map_widgets.dart';
@@ -1623,4 +1624,82 @@ class MapSurveyController extends GetxController {
break;
}
}
void openLayerPanel() {
Get.bottomSheet(
DraggableScrollableSheet(
initialChildSize: 0.45,
minChildSize: 0.3,
maxChildSize: 0.85,
snap: true,
snapSizes: const [0.3, 0.45, 0.85],
expand: false,
builder: (_, scrollCtrl) => Container(
decoration: BoxDecoration(
color: Get.theme.colorScheme.surface,
borderRadius: const BorderRadius.vertical(top: Radius.circular(16)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.15),
blurRadius: 16,
offset: const Offset(0, -4),
),
],
),
child: CustomScrollView(
controller: scrollCtrl,
slivers: [
SliverToBoxAdapter(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Handle
Center(
child: Container(
margin: const EdgeInsets.symmetric(vertical: 10),
width: 40,
height: 4,
decoration: BoxDecoration(
color: Colors.grey.shade300,
borderRadius: BorderRadius.circular(2),
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('Importált rétegek',
style: TextStyle(
fontSize: 18, fontWeight: FontWeight.w600)),
const SizedBox(height: 16),
ImportLayerPanel(
onFitBounds: fitImportedLayer,
),
],
),
),
],
),
),
],
),
),
),
isScrollControlled: true,
backgroundColor: Colors.transparent,
ignoreSafeArea: false,
);
}
void fitImportedLayer(LatLngBounds bounds) {
_isMapProgrammaticMove = true;
mapController.fitCamera(
CameraFit.bounds(
bounds: bounds,
padding: const EdgeInsets.all(48),
),
);
}
}