-
-
Notifications
You must be signed in to change notification settings - Fork 135
Description
Currently search by address is implemented by looping through each enabled shop, and check if the searched address matches its deliveryPerimeterExpression (see RestaurantFilter.php).
This is implemented like this, because restaurants can be either configured with a zone (a polygon) or a distance (a radius around the restaurant).
Of course, this is highly inefficient. Even if all restaurants are configured with the same zone, it would still evaluate each restaurant individually.
Instead, it should be possible use Tile38 to store all restaurants as objects representing their zone or circle, and check if the point (the address searched) is inside.
One problem may be that Tile38 does not support circles, so we might need to emulate circles using this technique.