Skip to content
Snippets Groups Projects
Commit aa0aa5a9 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: add OSM back

parent 74f7a4be
No related branches found
No related tags found
1 merge request!10Clhp map
...@@ -9,7 +9,7 @@ const String mapEndpoint = "update_map"; ...@@ -9,7 +9,7 @@ const String mapEndpoint = "update_map";
const int fetchInterval = 60; // Fetch marker data every n minutes const int fetchInterval = 60; // Fetch marker data every n minutes
// Map variables // Map variables
LatLng mapCenter = LatLng(60.7666, 10.8471); LatLng mapCenter = LatLng(60.8000, 10.8471);
DateTime ?lastUpdate; // Last time data was fetched from server DateTime ?lastUpdate; // Last time data was fetched from server
// Font variables // Font variables
......
...@@ -5,6 +5,7 @@ import 'package:google_fonts/google_fonts.dart'; ...@@ -5,6 +5,7 @@ import 'package:google_fonts/google_fonts.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'satellite_layer.dart'; import 'satellite_layer.dart';
import 'osm_layer.dart';
import 'stat_charts.dart'; import 'stat_charts.dart';
import '../../consts.dart'; import '../../consts.dart';
import 'choropleth_map.dart'; import 'choropleth_map.dart';
...@@ -97,7 +98,22 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -97,7 +98,22 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
color: Colors.white12, color: Colors.white12,
), ),
), ),
SizedBox( // Lake map SizedBox(
width: screenWidth * boxWidth,
height: screenWidth * boxHeight,
child: Stack(
children: [
OSM(markerList: widget.markerList), // OSM widget as the bottom layer
Positioned.fill(
child: Container(
color: Colors.grey.shade900.withOpacity(0.35), // Grey box with 50% opacity
// Additional content or widgets can be added here
),
),
],
),
),
SizedBox( // Color coded lake polygon
width: screenWidth * boxWidth, width: screenWidth * boxWidth,
height: screenWidth * boxHeight, height: screenWidth * boxHeight,
child: Padding( child: Padding(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment