from File
fun fromFile(context: Context, fileName: String, anchor: Point? = null, scaledSize: Size? = null): Icon
Build an Icon from a file in the app's internal files directory (Context.getFilesDir), matching Google Maps Android's fromFile semantics.
Decodes synchronously on the calling thread — for large files, invoke off the main thread.
val icon = Icon.fromFile(context, "downloaded_pin.png")Content copied to clipboard
Throws
if the file cannot be read or decoded.