diff --git a/assets/accessory_icons/bug_report.png b/assets/accessory_icons/bug_report.png index b211c79..fc8b506 100644 Binary files a/assets/accessory_icons/bug_report.png and b/assets/accessory_icons/bug_report.png differ diff --git a/assets/accessory_icons/business_center.png b/assets/accessory_icons/business_center.png index cd7637f..7aff008 100644 Binary files a/assets/accessory_icons/business_center.png and b/assets/accessory_icons/business_center.png differ diff --git a/assets/accessory_icons/credit_card.png b/assets/accessory_icons/credit_card.png index bff82fa..b653a5c 100644 Binary files a/assets/accessory_icons/credit_card.png and b/assets/accessory_icons/credit_card.png differ diff --git a/assets/accessory_icons/directions_car.png b/assets/accessory_icons/directions_car.png index 29a50d7..afe794e 100644 Binary files a/assets/accessory_icons/directions_car.png and b/assets/accessory_icons/directions_car.png differ diff --git a/assets/accessory_icons/directions_walk.png b/assets/accessory_icons/directions_walk.png index 40b8f13..84e9949 100644 Binary files a/assets/accessory_icons/directions_walk.png and b/assets/accessory_icons/directions_walk.png differ diff --git a/assets/accessory_icons/favorite.png b/assets/accessory_icons/favorite.png index c804798..6c0f8ae 100644 Binary files a/assets/accessory_icons/favorite.png and b/assets/accessory_icons/favorite.png differ diff --git a/assets/accessory_icons/language.png b/assets/accessory_icons/language.png index 884e2c3..2b9ff41 100644 Binary files a/assets/accessory_icons/language.png and b/assets/accessory_icons/language.png differ diff --git a/assets/accessory_icons/pedal_bike.png b/assets/accessory_icons/pedal_bike.png index 98b7190..0dc5534 100644 Binary files a/assets/accessory_icons/pedal_bike.png and b/assets/accessory_icons/pedal_bike.png differ diff --git a/assets/accessory_icons/pets.png b/assets/accessory_icons/pets.png index 922e3da..544de75 100644 Binary files a/assets/accessory_icons/pets.png and b/assets/accessory_icons/pets.png differ diff --git a/assets/accessory_icons/place.png b/assets/accessory_icons/place.png index b9df6d9..a1c48f8 100644 Binary files a/assets/accessory_icons/place.png and b/assets/accessory_icons/place.png differ diff --git a/assets/accessory_icons/push_pin.png b/assets/accessory_icons/push_pin.png index a1dc87e..1346961 100644 Binary files a/assets/accessory_icons/push_pin.png and b/assets/accessory_icons/push_pin.png differ diff --git a/assets/accessory_icons/redeem.png b/assets/accessory_icons/redeem.png index e69ad19..109227e 100644 Binary files a/assets/accessory_icons/redeem.png and b/assets/accessory_icons/redeem.png differ diff --git a/assets/accessory_icons/school.png b/assets/accessory_icons/school.png index abc54ed..350a484 100644 Binary files a/assets/accessory_icons/school.png and b/assets/accessory_icons/school.png differ diff --git a/assets/accessory_icons/visibility.png b/assets/accessory_icons/visibility.png index e86fba1..6c8b37d 100644 Binary files a/assets/accessory_icons/visibility.png and b/assets/accessory_icons/visibility.png differ diff --git a/assets/accessory_icons/vpn_key.png b/assets/accessory_icons/vpn_key.png index 3cc1d95..c0fdef3 100644 Binary files a/assets/accessory_icons/vpn_key.png and b/assets/accessory_icons/vpn_key.png differ diff --git a/assets/accessory_icons/work.png b/assets/accessory_icons/work.png index 9ed2b63..57752b7 100644 Binary files a/assets/accessory_icons/work.png and b/assets/accessory_icons/work.png differ diff --git a/lib/map/map.dart b/lib/map/map.dart index d82612e..3145cdf 100644 --- a/lib/map/map.dart +++ b/lib/map/map.dart @@ -27,6 +27,7 @@ class _AccessoryMapState extends State { void Function()? cancelLocationUpdates; void Function()? cancelAccessoryUpdates; bool accessoryInitialized = false; + bool mapStyleLoaded = false; @override void initState() { @@ -85,11 +86,13 @@ class _AccessoryMapState extends State { } updateMarkers(MapboxMapController controller, UnmodifiableListView accessories) async { + mapStyleLoaded = true; controller.removeCircles(controller.circles); controller.removeSymbols(controller.symbols); Set iconStrings = accessories.map((accessory) => accessory.iconString).toSet(); for (String iconString in iconStrings) { + // to convert from svg to RGBA png use `convert -background "rgba(0,0,0,0)" $f png32:${f%.*}.png` await addImageFromAsset(controller, iconString, "assets/accessory_icons/$iconString.png"); } @@ -111,7 +114,7 @@ class _AccessoryMapState extends State { .map((accessory) => SymbolOptions( geometry: accessory.lastLocation!, iconImage: accessory.iconString, - iconSize: 1.0, + iconSize: 0.425 * MediaQuery.of(context).devicePixelRatio, textField: accessory.name, textColor: "#000000", textOffset: const Offset(0, 1.5), @@ -132,7 +135,7 @@ class _AccessoryMapState extends State { accessoryInitialized = true; } - if (_mapController != null) { + if (mapStyleLoaded) { updateMarkers(_mapController!, accessories); }