This is the solution for moving realtime cars on Google Maps JavaScript using Google Firebase Realtime Database.
You can find Step by Step tutorial here http://codinginfinite.com/realtime-moving-cars-google-maps-javascript-google-firebase/
Check the Demo Here