Skip to content

Second Search dataFetch()

rothwell.andy@gmail.com edited this page Jul 26, 2024 · 2 revisions

After the initial search, the app will have data in only 1 of the following:

  1. GeocodeStore.aisData (if the address search bar was used)
  2. ParcelsStore.pwd and/or ParcelsStore.dor (if the map was clicked)

It now uses the function dataFetch() to get the OTHER data: if it has a geocode, it needs the parcels/if it has the parcels, it needs a geocode.

This is complicated by many things:

  1. All of the changes in the app follow the route. The app needs to be able to load with an address or address/topic in the route, and the back and forward buttons need to work. In these cases, the same dataFetch() function will be called, but it will need to find BOTH the geocode and parcels from that starting point. (check whether this is correct)
  2. There may be many DOR parcels, there may NOT be a PWD parcel or any DOR parcels that correspond to the geocoded address... All of the parcel issues discussed in Initial Search.
  3. There may be condos at the geocoded address or at the parcels found.

dataFetch() is therefore a long, complicated function, with multiple if statements in order to cover every case in which it may be run.

Clone this wiki locally