This now prefetches speed limit OSM API calls on the validate pages (regular validate and new validate beta). It achieves this by creating a cache object and caching the API responses and calculations ahead of time. Since camera position was not originally available, I had to add cameraLng and cameraLat properties to the ValidationLabelMetadata on the backend and Label.js (specifically the SVValidate data structure, not the one for SVLabel) on the frontend.
Testing instructions
Go to project sidewalk validation page
Observe that the speed limits are loaded in "instantly" upon moving to new labels
Also verify that they are being prefetched in the network devtools tab
Things to check before submitting the PR
[x] I've written a descriptive PR title.
[x] I've added/updated comments for large or confusing blocks of code.
Resolves #3665
This now prefetches speed limit OSM API calls on the validate pages (regular validate and new validate beta). It achieves this by creating a cache object and caching the API responses and calculations ahead of time. Since camera position was not originally available, I had to add
cameraLng
andcameraLat
properties to the ValidationLabelMetadata on the backend and Label.js (specifically the SVValidate data structure, not the one for SVLabel) on the frontend.Testing instructions
Things to check before submitting the PR