Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROG2900
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Savanovic Djordjevic
PROG2900
Commits
8f31097f
Commit
8f31097f
authored
1 year ago
by
Sara Savanovic Djordjevic
Browse files
Options
Downloads
Patches
Plain Diff
upate: visual, choro map
parent
4d7fbddc
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Choropleth map implementation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/lib/pages/widgets/map_widget.dart
+50
-41
50 additions, 41 deletions
app/lib/pages/widgets/map_widget.dart
with
50 additions
and
41 deletions
app/lib/pages/widgets/map_widget.dart
+
50
−
41
View file @
8f31097f
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment