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

upate: visual, choro map

parent 4d7fbddc
No related branches found
No related tags found
1 merge request!3Choropleth map implementation
......@@ -59,46 +59,6 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
borderRadius: BorderRadius.circular(20),
child: Stack( // Stack of quick view, map layer, satellite layer, and buttons
children: [
SizedBox(
width: screenWidth * boxWidth,
height: screenWidth * boxHeight,
child: ChoroplethMap(relation: widget.relation),
/*FlutterMap(
options: MapOptions(
center: mapCenter,
zoom: 9.0,
),
mapController: _mapController,
children: [
TileLayer(
urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
subdomains: const ['a', 'b', 'c'],
),
MarkerLayer(
markers: widget.markerList.map((Measurement measurement) {
return Marker(
width: 50,
height: 50,
point: measurement.center, // Set markers at center of measurement
builder: (ctx) => GestureDetector(
onTap: () {
setState(() {
selectedMarker = measurement;
});
},
child: Icon(
Icons.severe_cold,
color: measurement == selectedMarker ? Colors.green : Colors.blue,
size: measurement == selectedMarker ? 40.0 : 30.0,
),
),
);
}).toList(),
),
],
),*/
),
/*SizedBox(
width: screenWidth * boxWidth,
height: screenWidth * boxHeight,
......@@ -107,11 +67,60 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
SatLayer(markerList: widget.markerList), // Satellite layer
Visibility(
visible: satLayer, // Only show layer if satellite button is toggled on
child: SatLayer(markerList: widget.markerList),
child: FlutterMap(
options: MapOptions(
center: mapCenter,
zoom: 9.0,
),
mapController: _mapController,
children: [
TileLayer(
urlTemplate: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
subdomains: const ['a', 'b', 'c'],
),
MarkerLayer(
markers: widget.markerList.map((Measurement measurement) {
return Marker(
width: 50,
height: 50,
point: measurement.center, // Set markers at center of measurement
builder: (ctx) => GestureDetector(
onTap: () {
setState(() {
selectedMarker = measurement;
});
},
child: Icon(
Icons.severe_cold,
color: measurement == selectedMarker ? Colors.green : Colors.blue,
size: measurement == selectedMarker ? 40.0 : 30.0,
),
),
);
}).toList(),
),
],
),
),
],
),
),*/
SizedBox( // Colored box behind map
width: screenWidth * boxWidth,
height: screenWidth * boxHeight,
child: Container(
color: const Color(0x883366ff)
),
),
SizedBox( // Lake map
width: screenWidth * boxWidth,
height: screenWidth * boxHeight,
child: Padding(
padding: const EdgeInsets.all(15.0), // Padding around map
child: ChoroplethMap(relation: widget.relation),
),
),
Positioned( // Quick view box layered over map
bottom: 10,
right: 10,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment