You will need to write an actual mobile application. You may also need a obdii device with Bluetooth support. You will use the mobile GPS to calculate distance and direction, and the accelerometer to detect heavy acceleration and braking.
If you don't know enough physics and math to do the calculations, you may want to buy a sdk kit.
if you just want to track on a map, we aware that the GPS might not be accurate enough. you will probably have the app upload the GPS coordinates at known intervals to save battery. then on the server you try to map to actual roads. Azure IOT will be helpful in capturing the data.