Show favorites on map
This commit is contained in:
parent
cae02bfded
commit
67f3cd118f
@ -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,
|
||||||
),
|
)
|
||||||
]),
|
)
|
||||||
|
])
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user