[BUG?] Map tiles offset with random empty tiles.
See original GitHub issueFor example, it looks like this:
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:
- Created 8 years ago
- Comments:8 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@trusktr can’t say much until I see a reproduced JSFiddle test case. Maybe you forgot to include Leaflet CSS?
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.