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

update: OSM based on bbox instead of cetner coordinate

parent f2840d58
No related branches found
No related tags found
1 merge request!10Clhp map
import 'package:flutter/material.dart';
import 'package:latlong2/latlong.dart';
import 'package:flutter_map/flutter_map.dart';
import '../../consts.dart';
......@@ -17,12 +18,12 @@ class OSM extends StatelessWidget {
// Init list of polygons
List<Polygon> polygons = [];
// Map each element from markerList to a measurement object
return FlutterMap(
options: MapOptions(
center: mapCenter,
zoom: 9.0,
bounds: LatLngBounds(
LatLng(61.1947, 10.3491),
LatLng(60.3592, 11.3805),
),
),
children: [
TileLayer(
......
......@@ -6,7 +6,7 @@ class StatCharts extends StatelessWidget {
Widget buildLineChart(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(right: 17),
padding: const EdgeInsets.only(right: 20),
child: LineChart(
LineChartData(
backgroundColor: Colors.grey.shade800,
......@@ -23,16 +23,16 @@ class StatCharts extends StatelessWidget {
getTextStyles: (value) => const TextStyle(color: Colors.white60),
getTitles: (double value) {
switch (value.toInt()) { // Map int values to months
case 1:
case 0:
return 'January';
case 2:
case 1:
return 'February';
case 3:
case 2:
return 'March';
case 4:
case 3:
return 'April';
default:
return '';
return '...';
}
},
),
......@@ -65,7 +65,7 @@ class StatCharts extends StatelessWidget {
Widget buildBarChart(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(right: 17),
padding: const EdgeInsets.only(right: 20),
child: BarChart(
BarChartData(
alignment: BarChartAlignment.spaceAround,
......
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