xamarin.android - Xamarin Forms | Android: BitmapDescriptor Error - Image must be a Bitmap -


i trying use groundoverlayoptions add custom image android.gms.maps

bitmapdescriptor image = bitmapdescriptorfactory.frompath("fire2.bmp");  groundoverlayoptions newarkmap = new  groundoverlayoptions().invokeimage(image); newarkmap.position(e.point, 8600f, 6500f); map.addgroundoverlay(newarkmap); 

despite fire2.bmp being bitmap, still receiving error:

java.lang.illegalargumentexception: failed decode image. provided image must bitmap.

what missing?

i suggest use bitmapdescriptorfactory.fromresource. if @ compile time don't errors means resource exists , found @ runtime


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -