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

update: toggle osm and sat layers when the other is enabled

parent 2d127437
No related branches found
No related tags found
1 merge request!19Clhp map, license agreement
...@@ -141,6 +141,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -141,6 +141,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
onTap: () { onTap: () {
setState(() { setState(() {
satLayer = !satLayer; // Toggle satellite layer state on press satLayer = !satLayer; // Toggle satellite layer state on press
osmLayer = false; // Turn OSM layer off if it was turned on
}); });
}, },
child: Container( child: Container(
...@@ -163,6 +164,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ...@@ -163,6 +164,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
onTap: () { onTap: () {
setState(() { setState(() {
osmLayer = !osmLayer; // Toggle satellite layer state on press osmLayer = !osmLayer; // Toggle satellite layer state on press
satLayer = false; // Turn sat layer off if it was turned on
}); });
}, },
child: Container( child: Container(
......
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