Skip to content

[google_maps_flutter] Expose an "onTilesLoaded" to notify when all tiles have been fully rendered. #99610

@FranRiadigos

Description

@FranRiadigos

Use case

The flutter plugin exposes an onMapCreated() function that states when the map is ready.
However, until all tiles are fully loaded it shows a grid with grey lines, and any effect or any interaction with the map seems useless until tiles are rendered.

These are the use cases I wish to accomplish:

  • Ensure all tiles are rendered before taking a snapshot.
    Running the method takeSnapshot() after onMapCreated() leads to an image with either, partial tiles rendered or none at all.
  • Zoom-in to a position once the map is first loaded.
    The zoom effect is kind of weird if done after onMapCreated() is fired, since it will zoom a grid of grey lines.

Proposal

Each platform already contains a functionality to determine when tiles are fully rendered:

  • Android - GoogleMap.OnMapLoadedCallback
  • iOS - GMSMapViewDelegate.mapViewDidFinishTileRendering
  • Web - Map.tilesloaded

However, AFAIK, there is no such functionality in the flutter plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions