Leaflet + noWrap option not working in above 1.x version
See original GitHub issue- I am working in leaflet map chart. I tried to implement the nowrap option but its not working. -When i am using this theme “http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png” its working but when i tried to use dark theme not working. same code working in 0.x version.
var map = L.map('map', {
worldCopyJump: true,
inertia: false
}).fitWorld();
// OSM tiles
//http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
// L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',
{
maxZoom: 18,
// continuousWorld: false,
noWrap: true
}).addTo(map);
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Leaflet + noWrap option not working in above 1.x version
I am working in leaflet map chart. I tried to implement the nowrap option but its not working. please anyone suggest to solve...
Read more >Leaflet + Nowrap Option Not Working In Above 1.X ... - ADocLib
The following plugins allow loading different maps and provide functionality to tile and The plugin provides 96 daily updated layers with satellite imagery...
Read more >Documentation - a JavaScript library for interactive maps
Check this list if you are using a different version of Leaflet. Map. Usage example; Creation; Options; Events. Map Methods. Modifying map state;...
Read more >Having issues with Leaflet + GIBS + EPSG4326
After upgrading to a newer version, I've just run into a series of issues. I'm hoping someone can help me finally sort this...
Read more >Issues for Leaflet | Drupal.org
Fullscreen library not loading when using leafletRenderMap ... feature lost since 1.3 version, Needs work, Normal, Feature request, 8.x-1.x-dev, Code ...
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
So with those options, Leaflet is asking the following tiles:
So the
noWrap
behaviour is working as expected: the X tile coordinate does not wrap around the earth. The fact that the CartoDB tiles work for positive Xs and return 404s for negative Xs is a particular of that tileserver, and not a Leaflet bug.I’d rather go using the
maxBounds
option for this.Leaflet code working as expected → closing.
@Kostanos but from the code example you posted above, you haven’t told Leaflet about the bounds. How should it know that -1 is outside your bounds?