leaflet-osm icon indicating copy to clipboard operation
leaflet-osm copied to clipboard

Add asynchronous loading and removing functionality

Open nertc opened this issue 1 year ago • 0 comments

This PR addresses "Map Data checkbox: perhaps use toggle slider instead" issue mentioned in the https://github.com/openstreetmap/openstreetmap-website/issues/4931

Several changes were made to the data loading functionality:

  1. Rendering process will be asynchronous. Therefore, there will be no more browser or page freezes (see "Render Video").
  2. Removing process will be also asynchronous and there won't be any freezes (see "Remove Video").
  • While objects are being rendered, removing won't be triggered until the rendering process is done. After the process, application will check, and it will start removing rendered objects if necessary. The same applies vice versa.

Connected to the PR https://github.com/openstreetmap/openstreetmap-website/pull/5009 Fixes https://github.com/openstreetmap/openstreetmap-website/issues/4931

Videos:

Render Video

https://github.com/user-attachments/assets/8e11fc5f-1d9c-4458-a5a8-96479627d5ff

Remove Video

https://github.com/user-attachments/assets/0743916d-353e-4717-8600-c74937b6f2fe

nertc avatar Jul 24 '24 16:07 nertc