E
E
E6APB2017-08-20 18:15:57
PHP
E6APB, 2017-08-20 18:15:57

How do taxi services take into account the peculiarities of cities?

I do a taxi service. I look at other services and see that they have different tariffs in different cities. But it can still be stored normally in the database. Create a rates table with city_id, per_km, per_min, min columns. But for example, Yandex has some additional fields in different cities. From the metro this is more expensive, etc. How do they implement all this? I think in packs of shit code (a lot of if) or how can I do it more beautifully?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Nazarov, 2017-08-20
@E6APB

Of course, everything is decided in Ya.Taxi

packs of shit code
, do not doubt

A
awdemme, 2017-08-20
@awdemme

Regional split. The table will be simple.
Determining in which area of ​​​​the city the address is not at all difficult.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question