samiha-rahman / soen390

2 stars 0 forks source link

Bug-6: Should wait for outdoor map to load before showing interactive components #82

Closed ThierryRomain closed 4 years ago

ThierryRomain commented 4 years ago

Description: Currently, the application opens on the outdoor map and the toggle between campus and locate me buttons are shown right away. If these buttons are clicked before the map is loaded, they generate an error.

Resolution:

Reproduce:

Found in commit:

Resolved in commit:

ThierryRomain commented 4 years ago

This happens because the loading of the map happens in a promise (thus asynchronously).

To resolve, have a flag that indicates that the map is loaded be toggled at the end of the asynchronous function that loads the map.