N
N
Nikita Kit2017-03-02 15:07:39
JavaScript
Nikita Kit, 2017-03-02 15:07:39

What would you recommend to use to implement the calculation of the price from mileage in the application?

Good afternoon.
Tell me, how best to implement the calculation of mileage and prices when ordering a car for cargo transportation?
There is an application - something. Some preparation on MODX under miniShop2. In the near future, I will scale the application to a full-fledged online store for freight orders.
For implementation, I found 2 options: 1 - API business lines. But all infa of orders will leak to the server of direct competitors - which is the last thing.
2 - addon for MODX msDeliveryOnMap, which is not suitable only for the parameter that counts kilometers from only one starting point, which is defined only in the system settings.
Therefore, I decided to think about how to implement the task using improvised methods + map API. In principle, the input data is the starting and ending point, the choice of car. Everything is quite simple. I want to ask who used which maps or knows about the API that allows you to add these points to the map and get the distance in response, from which prices can already be calculated.
Thanks to all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2017-03-02
@freeExec

Both those and those maps have an API for building a route. You can even not use the map, but immediately ask to calculate the distance. Another thing is that neither one nor the other do not separate the cars and they can still drive a truck here or not, the main thing is there is a road.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question