question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG?] Map tiles offset with random empty tiles.

See original GitHub issue

For example, it looks like this:

screenshot from 2015-08-25 02-43-47

I’m using 1.0.0-beta.1 and I’ve got code that looks like this:

        this.map = new L.Map(
            document.getElementById('map'),
            {
                zoomControl: false,
                center: [ lat, lng ],
                zoom: 15
            }
        );

        // Open Street Map layer for our leaflet instance.
        var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
        var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
        var osm = new L.TileLayer(osmUrl, {
            minZoom: 0,
            maxZoom: 18,
            attribution: osmAttrib
        });
        this.map.addLayer(osm)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mournercommented, Aug 25, 2015

@trusktr can’t say much until I see a reproduced JSFiddle test case. Maybe you forgot to include Leaflet CSS?

0reactions
BADAKAAcommented, Oct 17, 2021

I was experiencing similar issues that had an entirely different cause.

This solution may not apply to you, but this might help any passerby using OpenStreetMaps:

In the URL, x, y and z must NOT be in alphabetical order like so:

const tileURL ="https://{s}.tile.osm.org/{x}/{y}/{z}.png";

but must instead be in this order>:

const tileURL = "https://{s}.tile.osm.org/{z}/{x}/{y}.png";

Otherwise, invalid tiles will be requested, resulting in an unusable, faulty map.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unity - Fixing Gaps Between Tiles - YouTube
Learn how to fix gaps appearing between tiles where no gap should be.Get the files for this video here: ...
Read more >
Leaflet-React map rendering tiles not in place and empty tiles
I am trying to render a simple Leaflet-React map to the screen. But the tiles are all messed up and or not rendering....
Read more >
Tilemap has tearing between tiles, even with pixel snap
Hey, I have a problem where my tiles have lines between them when moving ... so relative offset of each pixel to camera...
Read more >
Geoserver tiles mismatch - GIS Stack Exchange
So as I could understood all the tiles have pretty big offset. The offset tiles location. and I got them in the center...
Read more >
Tiled Documentation - Read the Docs
In terms of tile maps, it supports straight rectangular tile layers, ... Layers also have an offset and a parallax scrolling.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found