Closed
Description
This code works fine for IOS and the icon gets scaled to a size I'm happy with for my marker assets (png at 177x240px):
Future<BitmapDescriptor> getAssetImage(String path, BuildContext context) {
double dpr = MediaQuery.of(context).devicePixelRatio;
ImageConfiguration config = ImageConfiguration(devicePixelRatio: dpr*2.0,);
return BitmapDescriptor.fromAssetImage(config, path);
}
For Android, no matter what I pass for the devicePixelRatio, I always get the same size marker icon.
Note, that this might be a bug in the google map implementation since there seem to be similar issues - flutter/flutter#24865
Also, there are some alternative suggestions to size a marker via stackoverflow, but your version of BitmapDescriptor does not implement the fromBytes static method.