How to use Direction API [closed]

I want full code php and html when we give longtitude and latitude , when click naviagte button and show map and show live location with another direction.

I want when we click navigate button and also open map app show direction with two adress.