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

update: color mapping to *color filed

parent 9b76db67
No related branches found
No related tags found
1 merge request!19Clhp map, license agreement
......@@ -48,26 +48,26 @@ class ChoroplethMapState extends State<ChoroplethMap> {
shapeDataField: 'sub_div_id',
dataCount: widget.subdivisions.length,
primaryValueMapper: (int index) => widget.subdivisions[index].sub_div_id,
shapeColorValueMapper: (int index) => widget.subdivisions[index].avgThickness, // NB will later be minThickness
shapeColorValueMapper: (int index) => widget.subdivisions[index].color, // NB will later be minThickness
shapeColorMappers: const [
MapColorMapper(
from: 0,
to: 4,
to: 1,
color: Color(0xffff0000),
text: '{0},{1}'),
MapColorMapper(
from: 4,
to: 8,
from: 1,
to: 2,
color: Color(0xffff6a00),
text: '2'),
MapColorMapper(
from: 8,
to: 12,
from: 2,
to: 3,
color: Color(0xFFb1ff00),
text: '3'),
MapColorMapper(
from: 12,
to: 400,
from: 3,
to: 4,
color: Color(0xFF00d6ff),
text: '4'),
],
......
This diff is collapsed.
No preview for this file type
......@@ -100,7 +100,7 @@ def update_measurements(lake_name: str) -> (int, str):
'CenLatitude': center_lat,
'CenLongitude': center_lng,
'Accuracy': accuracy,
'Color': calculateColor(ice_stats[0]['Black ice (m)']),
'Color': calculateColor(avg_thickness),
'IceStats': ice_stats,
}
sub_div_ids.append(subdiv_id)
......
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