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

fix: tile selection

parent f91d7207
No related branches found
No related tags found
1 merge request!10Clhp map
...@@ -58,8 +58,17 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -58,8 +58,17 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
// Tile selection handler // Tile selection handler
void handleSelection(int index) { void handleSelection(int index) {
String indexString = index.toString();
setState(() { setState(() {
selectedTile= widget.markerList[index]; // NB should be optimalised
for (Measurement measurement in widget.markerList) {
for (SubDiv subdivision in measurement.subDivs) {
if (subdivision.sub_div_id == indexString) {
selectedTile= widget.markerList[index];
break;
}
}
}
}); });
} }
......
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