Marker(
markerId: MarkerId(place.place_id),
icon: BitmapDescriptor.fromAsset(Platform.isIOS ? 'assets/images/app_icon_48.png' : 'assets/images/app_icon_128.png'),
position: LatLng(place.geometry.location.lat, place.geometry.location.lng),
...
);
Does this work for you?
My searches all come up with ways that don't work. What's the new non-deprecated way to load a PNG file into a BitmapDescriptor?
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/4bf8477e-2075-4e76-85ea-af1bb5e79790%40googlegroups.com.
We load the map marker png this way:
Marker( markerId: MarkerId(place.place_id), icon: BitmapDescriptor.fromAsset(Platform.isIOS ? 'assets/images/app_icon_48.png' : 'assets/images/app_icon_128.png'), position: LatLng(place.geometry.location.lat, place.geometry.location.lng),...);Does this work for you?
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/1c48542b-b642-8294-91ae-d3c1c4180ea8%40knudstrup.org.
BitmapDescriptor.fromAssetImage(createLocalImageConfiguration(context),
'Images/XYZ.png').then((value) {
XYZIcon = value;
});
I get the Red Screen of Death saying that inheritFromWidget(), etc. was called before initState() finished.
I thought that the ".then" made everything wait?