Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 tasks done
pento opened this issue Jan 23, 2023 · 2 comments · Fixed by #1475
Closed
5 tasks done

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

pento opened this issue Jan 23, 2023 · 2 comments · Fixed by #1475
Labels
bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing

Comments

@pento
Copy link
Contributor

pento commented Jan 23, 2023

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
@pento pento added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Jan 23, 2023
@pento pento changed the title [BUG] TileLayer's fastReplace flag prevents rendering [BUG] [REGRESSION] TileLayer's fastReplace flag prevents rendering Feb 19, 2023
@JaffaKetchup
Copy link
Member

@pento Sorry for the really delayed response. v4 #1475 changes this behaviour, so it has likely been fixed. Please let us know if that works for you!

@pento
Copy link
Contributor Author

pento commented Apr 12, 2023

Thanks for pointing me at that PR, @JaffaKetchup! I've tested it, and confirmed that replacing fastReplace: true with tileDisplay: const TileDisplay.instantaneous() fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants