Skip to content

[BUG] fitBounds doesn't cause new tiles to load #1563

@billyz313

Description

@billyz313

What is the bug?

When I use the .fitBounds method the map moves to the correct location, however the tiles which are supposed to be displayed on the map do not load. If I slightly pan or zoom the map the tiles show up. This happens in the web version when running thru the Chrome browser. It works fine in the android version. You can see it happening in the image below.

fitBoundsExample

How can we reproduce it?

I removed the small bit of code from the search and hard coded the values so the code to reproduce can be as simple as

widget.controller.fitBounds(LatLngBounds(
                      LatLng(46.3471572, 0.0527585),
                      LatLng(48.9410263, 3.1286392)));

I work around it by programmatically moving the map directly after the fitBounds and it works, but I feel like it should be able to just fitBounds to show the tiles.

Do you have a potential solution?

No response

Platforms

Windows, visual studio code, Chrome(web-javascript), debug

Severity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P: 1 (important)bugThis issue reports broken functionality or another error

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions