Skip to content

[BUG] [REGRESSION] TileLayer's fastReplace flag prevents rendering #1435

@pento

Description

@pento

What is the bug?

This bug was introduced in flutter_map v3.1.0, v3.0.0 works as expected.

When rendering a TileLayer, setting the fastReplace flag to true prevents the layer from rendering.

What is the expected behaviour?

The layer should render.

How can we reproduce this issue?

import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(home: MyHomePage());
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: FlutterMap(
        options: MapOptions(),
        children: <Widget>[
          TileLayer(
            urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
            fastReplace: true,
          ),
        ],
      ),
    );
  }
}

Do you have a potential solution?

No response

Can you provide any other information?

No response

Platforms Affected

Android, iOS

Severity

Obtrusive: Prevents normal functioning but causes no errors in the console

Frequency

Consistently: Always occurs at the same time and location

Requirements

  • I agree to follow this project's Code of Conduct
  • My Flutter/Dart installation is unaltered, and flutter doctor finds no relevant issues
  • I am using the latest stable version of this package
  • I have checked the FAQs section on the documentation website
  • I have checked for similar issues which may be duplicates

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue reports broken functionality or another errorneeds triageThis new bug report needs reproducing and prioritizing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions