Skip to content

Tiles not appearing when using FlutterMap on multiple screens #707

@maro242

Description

@maro242

Steps to reproduce:

  1. Create two screens with FlutterMap (both maps should have identical center and zoom). Alternatively, you can run this example.
  2. Navigate from the first screen to the other.
  3. Tiles displayed on the first screen never appear on the second one.
  4. Panning in any direction will show tiles but the original area will remain unloaded.

This used to work on 0.8.2 but does not work since the changes to tile management on 0.9.0.

Removing the indicated line (965) from the _tileReady method in tile_layer.dart solves the issue.

var key = _tileCoordsToKey(coords);
tile = _tiles[key]; //Removing this solves the issue
if (null == tile) {
  return;
}

I do not understand the package enough to know what purpose does keeping tiles in the _tiles hash map serve but so far I have not noticed any issues since deleting it so am quite curious about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions