Make location pin prettier

This commit is contained in:
Reimar 2024-08-27 08:53:56 +02:00
parent 384f25ddbe
commit 2d039a04da
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268

View File

@ -81,14 +81,15 @@ class _MyHomePageState extends State<MyHomePage> {
MarkerLayer(markers: [ MarkerLayer(markers: [
Marker( Marker(
point: LatLng(favorite.lat, favorite.lng), point: LatLng(favorite.lat, favorite.lng),
width: 60, width: 30,
height: 100, height: 50,
alignment: Alignment.center, alignment: Alignment.center,
child: const Icon( child: const Stack(
Icons.location_pin, children: [
size: 60, Icon(Icons.location_pin, size: 30, color: Colors.yellow),
color: Colors.yellow, Icon(Icons.location_on_outlined, size: 30, color: Colors.black),
) ]
),
) )
]) ])
), ),
@ -99,7 +100,7 @@ class _MyHomePageState extends State<MyHomePage> {
} }
TileLayer get openStreetMapTileLayer => TileLayer( TileLayer get openStreetMapTileLayer => TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'dev.fleaflet.flutter_map.example', userAgentPackageName: 'dev.fleaflet.flutter_map.example',
); );
} }