You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While currently it is possible to get information on the distance from a property to some location (such as one's place of work) via the Google Maps Distance Matrix API, and while that information gets included in the message or notification flathunter sends, it is not currently possible to filter properties based on that distance.
This would be quite useful for me, as it would enable me to find properties within biking distance of my office.
PR incoming.
The text was updated successfully, but these errors were encountered:
colinemonds
pushed a commit
to colinemonds/flathunter
that referenced
this issue
Sep 13, 2023
This PR involves some refactoring. The problem is that previously,
filters ran before making any calls to external APIs. Therefore, just
adding another filter for the distance doesn't actually work: the
distance information is not yet available when we apply the filters. We
can't just run the filters later, because then we would run the Google
Maps API calls before we filtered out any properties, meaning that we
would incur Google Maps API calls for all properties that we find in our
search, including those that we later filter out anyway based on price,
size, etc. - and we actually have to pay for those requests! My solution
is to group the filters in two chains, and then run one chain before and
one after external API calls have been made. This way, we can run the
distance filter after the API calls are made, but keep everything else
the same.
While currently it is possible to get information on the distance from a property to some location (such as one's place of work) via the Google Maps Distance Matrix API, and while that information gets included in the message or notification flathunter sends, it is not currently possible to filter properties based on that distance.
This would be quite useful for me, as it would enable me to find properties within biking distance of my office.
PR incoming.
The text was updated successfully, but these errors were encountered: