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] TileLayer.tileBounds not working #1710

Closed
mohammedX6 opened this issue Oct 29, 2023 · 2 comments · Fixed by #1713
Closed

[BUG] TileLayer.tileBounds not working #1710

mohammedX6 opened this issue Oct 29, 2023 · 2 comments · Fixed by #1713
Assignees
Labels
bug This issue reports broken functionality or another error P: 1 (important)
Milestone

Comments

@mohammedX6
Copy link

What is the bug?

Setting tileBounds parameter to a value is not working at all

How can we reproduce it?

class TileBoundsTest extends StatelessWidget {
  const TileBoundsTest({Key? key}) : super(key: key);
 
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Tile bounds test')),
      body: Padding(
        padding: const EdgeInsets.all(8),
        child: Column(
          children: [
            Flexible(
              child: FlutterMap(
                options: const MapOptions(
                  initialCenter: LatLng(51.5, -0.09),
                  initialZoom: 5,
                ),
                children: [
                  TileLayer(
                    urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
                    userAgentPackageName: 'dev.fleaflet.flutter_map.example',
                    tileBounds: LatLngBounds(const LatLng(54.073206224834365, 1.5235210776232293),
                        LatLng(50.55519593132786, 1.5235210776232293)), // uk bounds
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Do you have a potential solution?

I don't know

Platforms

iPad 12.9 iOS 17.0, and Google pixel 5

Severity

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

@mohammedX6 mohammedX6 added bug This issue reports broken functionality or another error needs triage This new bug report needs reproducing and prioritizing labels Oct 29, 2023
@JaffaKetchup JaffaKetchup changed the title [BUG] Tile layer bounds not working [BUG] TileLayer.tileBounds not working Oct 29, 2023
@JaffaKetchup JaffaKetchup added P: 1 (important) and removed needs triage This new bug report needs reproducing and prioritizing labels Oct 29, 2023
@JaffaKetchup
Copy link
Member

Thanks for reporting, I can reproduce this issue. (Just to note, I used different coordinates, as I'm not sure those are correct to cover the UK.)

@mohammedX6
Copy link
Author

Thanks for confirming,btw I draw a rectangle covering big area that cover mostly UK.

josxha added a commit to josxha/flutter_map that referenced this issue Nov 1, 2023
josxha added a commit to josxha/flutter_map that referenced this issue Nov 1, 2023
@josxha josxha self-assigned this Nov 1, 2023
@JaffaKetchup JaffaKetchup linked a pull request Nov 1, 2023 that will close this issue
@josxha josxha added this to the v6.1 milestone Dec 2, 2023
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 P: 1 (important)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants