Fix infinite spinner when 400 error occurs due to 50k node limit by s…#11901
Fix infinite spinner when 400 error occurs due to 50k node limit by s…#11901Shyam-123pandey wants to merge 4 commits intoopenstreetmap:developfrom
Conversation
…afely subdividing tiles
There was a problem hiding this comment.
Pull request overview
This pull request attempts to fix an infinite spinner issue that occurs when the OpenStreetMap API returns a 400 Bad Request error due to exceeding the 50,000 node limit for a bounding box query. The fix introduces tile subdivision to break large tiles into smaller quadrants when a 400 error is encountered, and adds state management with a new _isLoading flag to track loading status.
Changes:
- Added 400 error handling with automatic tile subdivision up to 3 levels deep
- Introduced
_isLoadingflag to track loading state independently of inflight requests - Modified retry logic to handle 400 errors differently from rate limit errors
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as off-topic.
This comment was marked as off-topic.
I am changing variable name at this time Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Improve 400 tile subdivision logic This update refactors the 400 (50k node limit) subdivision logic to use the existing To maintain compatibility with existing test fixtures that use mocked
|
i did this and resolved all issues, please take a review of this. Thanks. |
|
Hello Sir , Please tell when this will be merged to main codebase? |
Fix infinite spinner when OSM API returns 400 for large bbox #11459
What this fixes
When the OSM API returns a
400 Bad Requestfor/map.json?bbox=...(typically caused by the 50k node limit), the editor keeps retrying the same tile and the loading spinner never stops.Even after API requests stop in the network tab, the tile remains in
_tileCache.inflight, so the spinner continues indefinitely.What was changed
400responses_tileCache.inflightand_tileCache.toLoadResult
Please take a look of vedio: https://drive.google.com/file/d/1-3UsnZWG6jUg05__sEQULTYYidnYVkZg/view?usp=drive_link
Tested by forcing a bbox that exceeds the 50k node limit.
I have added a vedio in comment of this issue if want please you can check for fixes.
Thanks