I was able to remove 2 of the 3 geoquery api calls when using the last location stored in 1localStorage1. This is accomplished by adding a new item to localStorage: 'TwcLatLon'.
The third one is a call to the reverse geocode to get the zip code. It could be stored and re-used as well, but it wasn't something that I had tackled in my fork so I didn't try to remove it yet.
The spanLastRefresh had to be moved to it's new location to resolve a race condition exposed by not needing to wait for the two round trips to the geocode server. The _AutoSelectQuery variable and code was also removed as it is no longer needed.
I was able to remove 2 of the 3 geoquery api calls when using the last location stored in 1localStorage1. This is accomplished by adding a new item to
localStorage
:'TwcLatLon'
.The third one is a call to the reverse geocode to get the zip code. It could be stored and re-used as well, but it wasn't something that I had tackled in my fork so I didn't try to remove it yet.
The
spanLastRefresh
had to be moved to it's new location to resolve a race condition exposed by not needing to wait for the two round trips to the geocode server. The_AutoSelectQuery
variable and code was also removed as it is no longer needed.