Show favorites on map

This commit is contained in:
Reimar 2024-08-22 11:46:45 +02:00
parent cae02bfded
commit 67f3cd118f
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268

View File

@ -76,23 +76,24 @@ class _MyHomePageState extends State<MyHomePage> {
key: _scaffoldKey, key: _scaffoldKey,
//drawer: navigationMenu, //drawer: navigationMenu,
body: FlutterMap( body: FlutterMap(
options: const MapOptions( options: const MapOptions(initialCenter: LatLng(55.9397, 9.5156), initialZoom: 7.0),
initialCenter: LatLng(55.9397, 9.5156), initialZoom: 7.0),
children: [ children: [
openStreetMapTileLayer, openStreetMapTileLayer,
const MarkerLayer(markers: [ ..._favorites.map((favorite) =>
Marker( MarkerLayer(markers: [
point: LatLng(56.465511, 9.411366), Marker(
width: 60, point: LatLng(favorite.lat, favorite.lng),
height: 100, width: 60,
alignment: Alignment.center, height: 100,
child: Icon( alignment: Alignment.center,
Icons.location_pin, child: const Icon(
size: 60, Icons.location_pin,
color: Colors.purple, size: 60,
), color: Colors.yellow,
), )
]), )
])
),
], ],
), ),
), ),