-
Notifications
You must be signed in to change notification settings - Fork 940
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
Map Data checkbox: perhaps use toggle slider instead #5009
base: master
Are you sure you want to change the base?
Conversation
5f00a0b
to
0e1677a
Compare
Are you planning to get the changes to |
@AntonKhorev Yes. Should I create a separate PR in the https://github.com/openstreetmap/leaflet-osm for it? |
d07bf66
to
d9615c6
Compare
I created a PR for the leaflet-osm (openstreetmap/leaflet-osm#38) that needs to be merged before this PR will be, as asynchronous loading part depends on it. |
d9615c6
to
41e6069
Compare
This PR is linked to the openstreetmap/leaflet-osm#38. If leaflet-osm PR is not merged, this PR can't be merged. |
41e6069
to
ca019cd
Compare
PR was updated to include changes made in the openstreetmap/leaflet-osm#38. As leaflet-osm PR is now merged, this PR can be reviewed and merged. |
Now you can check Map Data, wait for the rendering to start then quickly click Map Data 2*n times and watch how data is added then removed then added then removed... n times. While this is happening and Map Data is checked, pan to a different place to get a stream of javascript errors. |
ca019cd
to
4b91e79
Compare
@AntonKhorev I couldn't reproduce JS errors in the console. But I changed logic and now when user clicks "Map Data" checkbox, previous action is skipped immediately. Therefore, there will be no 2*n loads and errors. When we will be okay with the solution, I'll create a new PR in the leaflet-osm. |
If there are no other change requests for this PR, I'll create a new PR for the leaflet-osm to merge changes done in the |
4b91e79
to
af830a1
Compare
af830a1
to
fca12a2
Compare
PR was updated. Branch was synced with master and conflicts were resolved. Also, instead of handling canceling layer loading in the Optimizations for layer rendering were done in openstreetmap/leaflet-osm#43, but still this PR is relevant, because it adds loading spinner for those cases when data is processed by the back end, and also for slower CPUs (for example, when I set |
This PR addresses "Map Data checkbox: perhaps use toggle slider instead" issue mentioned in the #4931
Several changes were made to the data loading functionality:
Connected to the PR openstreetmap/leaflet-osm#38
Fixes #4931
Videos:
Loading Video
OpenStreetMap.and.33.more.pages.-.Work.-.Microsoft.Edge.2024-07-25.11-51-38.mp4
Render Video
OpenStreetMap.and.28.more.pages.-.Work.-.Microsoft.Edge.2024-07-20.16-55-01.mp4
Remove Video
OpenStreetMap.and.28.more.pages.-.Work.-.Microsoft.Edge.2024-07-20.16-56-42.mp4