Skip to content

Allow direct control of scaling for BitmapDescriptor (Maps plugin) #34386

@duzenko

Description

@duzenko

Related to #34183, #27393, #1208

Use case

I have an image that I want to use as a marker icon on Google Maps with scaling ratio 3.5.
There is no way to achieve this currently unless I provide mipmaps for it (didn't try playing with fractional ratios though so it might not work at all)

Proposal

  1. Make use of ImageConfiguration.devicePixelRatio in BitmapDescriptor.fromAssetImage
  2. Preferably also offer a sync version of this function as there's nothing async required for this and async marker load will require a consecutive setState and widget rebuild.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions