Skip to content

Not all necessary tiles are loaded after a zoom change (demo video) #463

@filipevl

Description

@filipevl

Good job with this library @johnpryan and all contributors!

I'm experiencing a bug where after zooming in to a new level, not all tiles that should appear on the screen are loaded. Moving the camera is needed to make them load.

Video demonstrating a zoom increase with not all tiles (bottom left in this case) loading until i start scrolling on the map again. https://imgur.com/a/3kfI3qM

The tiles provider used was AssetTileProvider().

Here is the code but I'm not sure how relevant it is:

FlutterMap(
  mapController: mapController,
  options: MapOptions(
    center: lisbon,
    zoom: 13.0,
    minZoom: 13.0,
    maxZoom: 16.0,
    swPanBoundary: LatLng(38.358, -9.634),
    nePanBoundary: LatLng(39.15, -8.458),
  ),
  layers: [
    TileLayerOptions(
      keepBuffer: 4,
      tileProvider: AssetTileProvider(),
      urlTemplate: "assets/map/{z}/{x}/{y}.png",
      maxZoom: 16,
      tms: true,
      backgroundColor: Colors.white,
     ),
     MarkerLayerOptions(
       markers: markers,
     ),
   ],
),

I would love to contribute myself but I'm fairly novice and looking at the source code seems very complex. Hoping to see this and the keep the old tiles until the new ones are loaded improvements for 0.8 as I truly believe that would make this the best flutter map library!

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