re factor rog

This commit is contained in:
2024-04-01 09:26:56 +05:30
parent dd36ab8399
commit edbf52825b
54 changed files with 2597 additions and 435 deletions

View File

@ -1,24 +1,24 @@
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_map/flutter_map.dart';
// import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
class BaseLayer extends StatelessWidget {
const BaseLayer({Key? key}) : super(key: key);
// class BaseLayer extends StatelessWidget {
// const BaseLayer({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return TileLayer(
urlTemplate: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",
tileProvider: FMTC.instance('OpenStreetMap (A)').getTileProvider(
settings: FMTCTileProviderSettings(
behavior: CacheBehavior.values.byName('cacheFirst'),
cachedValidDuration: const Duration(days: 14),
),
),
);
}
}
// @override
// Widget build(BuildContext context) {
// return TileLayer(
// urlTemplate: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",
// tileProvider: FMTC.instance('OpenStreetMap (A)').getTileProvider(
// settings: FMTCTileProviderSettings(
// behavior: CacheBehavior.values.byName('cacheFirst'),
// cachedValidDuration: const Duration(days: 14),
// ),
// ),
// );
// }
// }
// var Esri_WorldImagery = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
// attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
// });
// // var Esri_WorldImagery = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
// // attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
// // });

View File

@ -195,7 +195,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
destinationController.currentLon,
destination.location_id!,
);
saveGameState();
//saveGameState();
await ExternalService().startRogaining();
Get.back(); // Close the dialog and potentially navigate away
},

View File

@ -237,7 +237,7 @@ class _MapWidgetState extends State<MapWidget> {
.hideAllPopups(), // Hide popup when the map is tapped.
),
children: [
const BaseLayer(),
//const BaseLayer(),
Obx(
() => indexController.routePointLenght > 0
? PolylineLayer(