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

update: small change no server behavior

parent bbf1e68f
No related branches found
No related tags found
1 merge request!10Clhp map
......@@ -39,7 +39,12 @@ class _DefaultPageState extends State<DefaultPage> {
throw Exception("Failed to fetch measurements: $error");
});
relationFuture = fetchRelation();
// Attempt to fetch relation from server if app establishes connection
if (serverConnection){
relationFuture = fetchRelation();
} else { // Read last saved data
relationFuture = loadSavedRelation();
}
// Schedule fetchMarkerData to run periodically based on fetchInterval
const Duration interval = Duration(minutes: fetchInterval); // NB fetchInterval value to be determined
......
......@@ -40,7 +40,6 @@ class _ChoroplethMapState extends State<ChoroplethMap> {
late MapShapeSource mapShapeSource;
late final MapZoomPanBehavior _zoomPanBehavior = MapZoomPanBehavior();
List<SubDiv> subdivisions = <SubDiv>[];
List<SubDiv> groupDivisions = <SubDiv>[];
@override
void initState() {
......
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