Cowin-team / cowin_map

0 stars 1 forks source link

Get Details API call to fetch location Info #103

Closed aneeshapunreddy closed 3 years ago

aneeshapunreddy commented 3 years ago
  1. This commit replaces the references to the static citiesWithResources.js location data file that needs to be updated manually with a call to the get_details API.
    • The results of the get_details API are cached in the browser session for faster map rendering.
    • the latency for get_details api call is noticeably high - since the location info is not something that's updated very often, we'll call the API only once per session. The first load is the longest (in the US, could be must faster in India) - if the user waits for the first load for 10 to 15 seconds [enough to get the response from the api], the subsequent map renders are very quick due to caching.
  2. The Cowin Map UI will have three dropdowns once this commit is merged to mainline - Country, State & City.
    • Country drop down is in preparation for adding new countries like Srilanka - since the API has no info related to Srilanka, India is the current default.
    • Since we only have coordinates for cities, when the user selects the state, the map doesn't reload. It reloads only upon selection of the city.
    • the dropdowns will get completely reset only when the user starts a new session (new browser or opens a new window)
aneeshapunreddy commented 3 years ago

Country & State dropdowns + Map data fetch from get_details API"