urajesh Posted April 18, 2019 Share Posted April 18, 2019 As we have been working on an eCommerce project, we want to add an option in the eCommerce, that user should have the live location tracking of delivery boy (as same as SWIGGY) in the website. Is there any chance to track the live location using PHP and JavaScript? Searched on the google but nothing resolved my problem? Please anyone suggest us to track the live location of the delivery boy. Thanks in advance Quote Link to comment Share on other sites More sharing options...
chhorn Posted April 18, 2019 Share Posted April 18, 2019 You can use window.navigator.geolocation.watchPosition or try getCurrentPosition with setInterval() Quote Link to comment Share on other sites More sharing options...
taquitosensei Posted April 18, 2019 Share Posted April 18, 2019 So you want tracking information but want it refreshed on a regular basis? Is it always shipped through the same shipping company? ie FedEx, UPS, etc? If not you'll have to come up with a solution for each tracking company. Just deal with pulling tracking information first, then worry about refreshing it. So you have to pull the shipping provider and tracking # out of your database, then based on the shipping provider use an api to get the tracking info, then parse that info and display it. Quote Link to comment Share on other sites More sharing options...
urajesh Posted April 19, 2019 Author Share Posted April 19, 2019 17 hours ago, chhorn said: You can use window.navigator.geolocation.watchPosition or try getCurrentPosition with setInterval() Thank you for your response, will you please suggest us the sample code or reference links, so that we can change our code as per our requirement and thanks in advance Quote Link to comment Share on other sites More sharing options...
urajesh Posted April 19, 2019 Author Share Posted April 19, 2019 7 hours ago, taquitosensei said: So you want tracking information but want it refreshed on a regular basis? Is it always shipped through the same shipping company? ie FedEx, UPS, etc? If not you'll have to come up with a solution for each tracking company. Just deal with pulling tracking information first, then worry about refreshing it. So you have to pull the shipping provider and tracking # out of your database, then based on the shipping provider use an api to get the tracking info, then parse that info and display it. Thank you for your response, We are not particular about the shipping company and Is it possible to track the live location of the delivery boy (say) using PHP, Will you please suggest us some reference links or sample code so that we can change our code to match our requirement. Quote Link to comment Share on other sites More sharing options...
chhorn Posted April 23, 2019 Share Posted April 23, 2019 (edited) link: https://duckduckgo.com/?q=getCurrentPosition Edited April 23, 2019 by chhorn Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.