Comments (3)
I noticed that this still happens on iOS 5.0 and 5.1, for example in the Quick Start example
From what I can tell, it happens whenever the longest side of the SVG element is larger than 1280px. Since the standard clip padding for paths is 0.5, this happens as soon as any side of the map is larger than 640px. To alleviate this in my fullscreen iPad map, I now set the following before creating the map:
L.Path.CLIP_PADDING = Math.max(0, Math.min(0.5, (1280 / Math.max(innerWidth, innerHeight) - 1) / 2));
This sets the clip padding to 0.125 on the iPad, meaning that the largest SVG we'll get is 1024*1.25 = 1280.
Not sure what the best way to handle this is for Leaflet, but for now I hope this information and quick fix can be of help for people stumbling on the same flickering as I did.
from leaflet.
Wow, that's a really smart observation, I had no idea that the bug depends on the SVG element size! I'll test it out myself, and will be really glad if it's confirmed. Thanks a lot!
from leaflet.
Sorry for being slow on this, incorporated your fix into master. :)
from leaflet.
Related Issues (20)
- Backup/secondary tile server HOT 1
- Map attribution Flag Removal where not appropriate HOT 3
- Marker loads png from media instead of own image folder. HOT 2
- After displaying the polygon, a canvas is created that overlaps all elements on the map HOT 1
- Allow configuration of duration multiplier for flyTo
- Add `resetStyle` to `L.featureGroup` HOT 1
- "An error occurred trying to load the resource" - error in network tab when no visible missing tile HOT 3
- Can a popup have a position set automatically?
- Leaflet - adding the capability to update the title dynamically based on animation frames HOT 1
- import are not working HOT 2
- unpkg distribution currently gives http code 520 HOT 2
- Stopped woking with leafmap on displaying Satellite imagery HOT 2
- Tile events are not being cleaned up HOT 2
- Tall custom sized tiles are not wrapped correctly
- zoom level less than 3 hide the leaflet layer HOT 1
- Roads had explicit names on HOT 2
- Read Vectors from .geoparquet file HOT 1
- mouseover and mouseout events are switching continuously.
- Geolocation error (kCLError Domain 0) on iOS when no WiFi networks are in range HOT 3
- Default maximum zoom level HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet.