very good tutorial helps me! i wanted to auto calculate the distance so that easy for me to qoute my customer delivery charge, and this tutorial show the simplest way!
Hey, i am working on same site. Where user have to input two locations and he will get distance and cost. Fo u have any idea about how to implement this code?
wow this is great. 2 questions though. i use forminator form builder in wordpress and i want instead of place name use zipcode. how can i do this?Also how can i add the apis and the calculator.php into wordpress?
would like to ask can this code works in visual studio 2017? The calculation part and the displaying of places is not working for me. How can i solve it?
i want a wear OS app, after setting up destination on phone. the app get the destination from phone and then calculate the distance using google api and display that on screen with time remaining, whenever i check. that would be cool. is that possible?
I need to calculate the fee for a trip which has two points, in the same way Uber and Didi do. It must be very precise, with the use of time, distance, weather, people using the app at the same time, drivers available, rush hours traffic, base fees, all this variables add some amount to the total price. I don't know exactly which variables they use, either the moment they apply them, I would apply your code to my app. Pls it has to generate formula too Can this be possible?
Thanks a lot man. I have a question, how can implement the map too? i mean users can input the direction and at the same time see the map on the left of the page.
Hi! I think now the URL it's not working good... :( Also, I have a quick question, the distance is lineal from point A to point B or it's by car/highway? Many thanks!!
Hi Aaron,you are welcome,it is much easier,just remove new google.maps.places.Autocomplete() from line 66and 67 and only keep the code between () finally add the coordinates to the inputs and submit :)
I found the error that is happening with this google distance matrix app you created. It works on every browser except Firefox... Type Error: distance is undefined... IS there a way around this? Thanks in advance.
Good Video, I have a console's problem with the callback (Loading the Google Maps JavaScript API without a callback is not supported) someone can help me with that error. I'll appreciate
brilliant stuff, I can see the result in the console but doesn't show on the web page against . could you please advise mate? message from console : {text: "17.8 mi", value: 28660} text: "17.8 mi" value: 28660 __proto__: Object
Me too i think you have to activate your account by entering your credit card information and you will get a free trial, but I still don't know if that's the solution since I don't have a credit card to try.
i have got your sample code from given location and I try with my own API, it seems not work. it is not load location details when i type in input box. what should i do for fix this problem. pls help me
Console error code - InvalidCharacterError: String contains an invalid character ----- rocket-loader.min.js:1 I have integrated the code but when i search the location it does not appears in dropdown list. What is the problem?
if any location not found in the drop-down this means either two thing: 1-may be you write a wrong characters 2-may be not updated in google service yet
You are welcome laura , you can fighure out what happen behind the scene by using console and read error messages , this what i ever do when i ran into a problem with javascript code
Help me, please. How do I open the project on my computer? I'm having this error: Uncaught TypeError: Cannot read property 'value' of undefined at callback (calculator.html:112) And the autocomplete isn't work.
I was able to solve the problem. The version of Jquery that I was using in my project ended up conflicting with the example version. Thanks a lot for the help!
hello sir i am get your code it is not proper working on live server project please help and i wan to show output on another not same page give me suggestion as soon as possible
Uncaught TypeError: Cannot read property 'value' of undefined at callback (calculator.html:83) at distance_matrix.js:4 at hm.m (distance_matrix.js:3) at Object.c [as _8jtuq2] (common.js:47) at VM77 DistanceMatrixService.GetDistanceMatrix:1
Hai Webeasystep Is it possible to show miles calculations by each state passing & and store it in mysql db. using google api or any other api service. I am waiting for your humble reply for eg: From: Columbus, OH, USA To: Miami, FL, USA Duration: 17 hours 8 mins State Distance (miles) OH 113.30 WV 146.85 VA 71.25 NC 107.04 SC 228.05 GA 112.76 FL 376.12 Total 1155.38 link source: trulos.com/truckload/mileage-by-state.php
can i get the sample code? i dont know where the link is. and is these API's are on paid basis? bcz i am trying to get a API key but it directs me to the billing enable portion.
Avinash Kumar all links in the description, about API key, you should get one from Google that requires billing info,if you need alternatives there is another serise on this channel
قصدك الديمو ؟...الديمو شغال...لو قصدك المثال فأكيد في خطوة في النص ناقصة..طيب تكتشفها ازاي..بسيطة جدا. اضغط f12 افتح console وشوف ايه الايرور ال بيطلعلك وللعلم بيبقي غالبا معاه رابط كمان لحل المشكلة بالتفصيل..بس حتى لو مفهمتش حاجة ممكن تعمل سيرش بسيط او تكتبها هنا وهتلاقي لها حل..لأنها اكيد خطوة في النص بسيطة...بالتوفيق
It works only on google chrome, it does not work on other browsers. Does not work in browsers on mobile phones. Help please solve the problem. It would also be good to display the map and intermediate stops.
hei sir, i just try calculate using google distance matrix API on my Chrome but i cann't calculate as you did why ? and when i try in Mozilla Firefox the script doesnot work too
@@web_easy_step Failed to load resource: the server responded with a status of 403 (Forbidden) test.php:8 Uncaught ReferenceError: google is not defined at test.php:8 test.php:11 Uncaught ReferenceError: google is not defined at initialize (test.php:11) at onload (test.php:65) these are the errors in consol, can you help me? come on skype?
jes merida hi jes , press f12 and open the console tab in the browser then copy the error and paste in the Google or if you want more help paste here, the console is the best way to figure out what happened behind the scene
wow! this is a nice video with good explanation. I am working on my final project and it uses google maps APIs, this really helped me. thank you.
very good tutorial helps me! i wanted to auto calculate the distance so that easy for me to qoute my customer delivery charge, and this tutorial show the simplest way!
Hey, i am working on same site. Where user have to input two locations and he will get distance and cost. Fo u have any idea about how to implement this code?
Bro ur amazing, I don't speak English very well, but I appreciate your soft and slow voice. I can understand
wow this is great. 2 questions though. i use forminator form builder in wordpress and i want instead of place name use zipcode. how can i do this?Also how can i add the apis and the calculator.php into wordpress?
You helped me with my project.. Thanks a lot
is it free to use
Thankyou for this tutorial. It works.
:( This year you have to use a card?!
Can you believe it
Hi, thank you for the example. In this example, how can I view the automatic calculation after typing two addresses without the calculate button?
is it free to use
Nice explication 👌
Great video. in 2024 now. I have added my API but it does not find the cities.
Excellent video , thanks for your knowlegment
I have a question why you use hidden input fields you can pass the data from from_place input also?
u are awesome man was looking for this kinda tutorial for long time
6:35 is after enabling API.
Hi, is the website mentioned in your description working? I am not able to use it
would like to ask can this code works in visual studio 2017? The calculation part and the displaying of places is not working for me. How can i solve it?
Is it possible to calculate distance between two points google maps in java programming language i.e)Linking google maps API with java
Hi bro !
Could you help me please? i have everything working on pc but does not work on my android (chrome) do i have to do somthing ? thanks bro
i want a wear OS app, after setting up destination on phone. the app get the destination from phone and then calculate the distance using google api and display that on screen with time remaining, whenever i check. that would be cool.
is that possible?
This was an excellent tutorial, thank you for going into detail
is it free to use
I need to calculate the fee for a trip which has two points, in the same way Uber and Didi do. It must be very precise, with the use of time, distance, weather, people using the app at the same time, drivers available, rush hours traffic, base fees, all this variables add some amount to the total price. I don't know exactly which variables they use, either the moment they apply them, I would apply your code to my app. Pls it has to generate formula too
Can this be possible?
It is not working for calculating long distances...for ex: distance from new york to mumbai..why?
Thanks a lot man. I have a question, how can implement the map too? i mean users can input the direction and at the same time see the map on the left of the page.
Download code from GitHub
Amazing, thank you
helpful content - many likes
Hi! I think now the URL it's not working good... :( Also, I have a quick question, the distance is lineal from point A to point B or it's by car/highway? Many thanks!!
wha sir gee kya bat ha ap ki.. :P
hey thank a lot. i got one question im trying to print the "in_kilo" value in a textbox how can i do that ?
just comment the line 92 and user code in line 93
Please tell me why is input fields not working in mobile phone in browser? API not respond
Thanks for the great tutorial, how could I make something similar but that instead of having places in the inputs I can have coordinates?
Hi Aaron,you are welcome,it is much easier,just remove
new google.maps.places.Autocomplete()
from line 66and 67 and only keep the code between ()
finally add the coordinates to the inputs and submit :)
Awesome!
there is error in demo page please check
I found the error that is happening with this google distance matrix app you created. It works on every browser except Firefox... Type Error: distance is undefined... IS there a way around this? Thanks in advance.
very good explaination. I want to use it on my website. Sir Google Maps Distance Matrix API is still free??
getting error {Google Maps JavaScript API error: RefererNotAllowedMapError},javascript api is enable ! please help sir
Good Video, I have a console's problem with the callback (Loading the Google Maps JavaScript API without a callback is not supported) someone can help me with that error. I'll appreciate
brilliant stuff, I can see the result in the console but doesn't show on the web page against . could you please advise mate?
message from console :
{text: "17.8 mi", value: 28660}
text: "17.8 mi"
value: 28660
__proto__: Object
Did you end up finding the solution?
Gracias, fue exacto lo que necesitaba, buena contribución.
Hello there, I downloaded this code and tried with my API key but it is not working.
Is this code still valid?
Me too i think you have to activate your account by entering your credit card information and you will get a free trial, but I still don't know if that's the solution since I don't have a credit card to try.
Hello dear i am still looking forward for your new video which contain info window using sql database
it say distance is undefined type error line 85 any help
excelent !! But is it possible to add a map in which we select two places and this program calculates the distance ?
this is already done with google map itself without needing for any app
Does not work in browsers on mobile phones. What you need to do to the calculator counted on mobile phones?
It gives error: TypeError: distance is undefined
You are not getting data in distance variable. Check your code
i have got your sample code from given location and I try with my own API, it seems not work. it is not load location details when i type in input box. what should i do for fix this problem. pls help me
press F12 and read error from console
there is no error but location not popup in textbox. tel me what should I do?
Same here how to solve it
Thanks..That helped me a lott
but it works in the online area. Or including the whole route?
tu sei lo zio what is meaning of online area?
@@Webeasystep I mean the distance from one point to another? or includes all the way, curves, etc.
@@at_ecu5982 sure including all the way
Great Video
Good video! however, it would a look easier to read your code if you indented it properly. It's hard to tell where a div starts and where it ends.
Can you use c# to count the distance from point to point coordinate on google map : ) I had to hand in my assignment in a week, plz help me .
Sorry I haven't any experience with c#
nice one sir!
This is great! just what I was looking for.
is it free to use
Can you please tell how to run that code on a local server. I'm not able to get what to do.
It will be great if you can display the rout on the map.
maybe in the future i do like such tutorial
Look video at my channel, cheers.
could please write and give me the link please. i want to show the route map on the right side also along with your this video function.
Console error code -
InvalidCharacterError: String contains an invalid character ----- rocket-loader.min.js:1 I have integrated the code but when i search the location it does not appears in dropdown list. What is the problem?
if any location not found in the drop-down this means either two thing:
1-may be you write a wrong characters
2-may be not updated in google service yet
sir can u tell me why when i change your api key on the code it s make issue and i cant calc anything
Hamza Berouayel this is for sure because you miss a step in this tutorial, repeat the tutorial again and follow step by step
Thanks for your explanation! but the jquery version did not solve the autocomplete problem and I already change the key
You are welcome laura , you can fighure out what happen behind the scene by using console and read error messages , this what i ever do when i ran into a problem with javascript code
Hi, Great tutorial. But i want to show the gogle route with google map along with the the distance calculation. How can i do that?
thanks,but nowadays i am no longer support google maps because it is pricing ,i will make another series for mapbox
Help me, please. How do I open the project on my computer? I'm having this error:
Uncaught TypeError: Cannot read property 'value' of undefined
at callback (calculator.html:112)
And the autocomplete isn't work.
there is no 112 line in my example
Sorry. The correctly line is 88.
var distance_in_kilo = distance.value / 1000; // the kilom
I was able to solve the problem. The version of Jquery that I was using in my project ended up conflicting with the example version. Thanks a lot for the help!
good job jao
hi, can i know what you do then? I faced the same thing, huhu, tq
is this on road distance?
how should we get best route between two places
in new dashborad how i can create credentials ?
hello sir i am get your code it is not proper working on live server project please help and i wan to show output on another not same page give me suggestion as soon as possible
i think your problem is to getting your own API KEY ,also to insure the type of the issue use chrome console
how to make it use in smartphone? i have put in server.. smartphone not working.. help please
no man,smart phone has it is own permessions
Thank you for toturial man
you are welcome bro
Thanks a lot . Very interesting tutorial 👌😍
You are welcome
Can i get with along map showing multiple lines
i have an error ApiNotActivatedMapError. how can solve this error?
how to send multiple destinations using Google Distance Matrix API ???
i was searching answer for the same question , did you find out the way ???
do we have to pay to use google maps programs?
Eric Wijanarko ngentot
Sir
Can u give me
For 4 location
Calculate km and multiplication 5.2
Hello.
What is the difference between distance matrix api and directions api?
is it free to use
still works in 2021
Very nice! Thank you!
is it free to use
Uncaught TypeError: Cannot read property 'value' of undefined
at callback (calculator.html:83)
at distance_matrix.js:4
at hm.m (distance_matrix.js:3)
at Object.c [as _8jtuq2] (common.js:47)
at VM77 DistanceMatrixService.GetDistanceMatrix:1
Hai Webeasystep
Is it possible to show miles calculations by each state passing & and store it in mysql db. using google api or any other api service. I am waiting for your humble reply
for eg:
From: Columbus, OH, USA
To: Miami, FL, USA
Duration: 17 hours 8 mins
State Distance (miles)
OH 113.30
WV 146.85
VA 71.25
NC 107.04
SC 228.05
GA 112.76
FL 376.12
Total 1155.38
link source:
trulos.com/truckload/mileage-by-state.php
Bro should we buy it?
Sure
can i get the sample code? i dont know where the link is. and is these API's are on paid basis? bcz i am trying to get a API key but it directs me to the billing enable portion.
Avinash Kumar all links in the description, about API key, you should get one from Google that requires billing info,if you need alternatives there is another serise on this channel
which video is the alternative? because I don't have any billing information to give as am still a student.
I want to use the distance matrix and geolocation of google maps. what alternatives are there for these?
How to convert the duration text value to be divided by 2
just like that time / 2
How can I add this to my wordpress website
تسلم يا ابو حميد
الله يسلمك :)
بس برضو التوقع التلقائي مشتغلش
وحتي ف المثال الي ف الوصف برضو
قصدك الديمو ؟...الديمو شغال...لو قصدك المثال فأكيد في خطوة في النص ناقصة..طيب تكتشفها ازاي..بسيطة جدا. اضغط f12 افتح console وشوف ايه الايرور ال بيطلعلك وللعلم بيبقي غالبا معاه رابط كمان لحل المشكلة بالتفصيل..بس حتى لو مفهمتش حاجة ممكن تعمل سيرش بسيط او تكتبها هنا وهتلاقي لها حل..لأنها اكيد خطوة في النص بسيطة...بالتوفيق
It works only on google chrome, it does not work on other browsers. Does not work in browsers on mobile phones. Help please solve the problem. It would also be good to display the map and intermediate stops.
did you install php in your pc ?? maybe thats the issue
hei sir, i just try calculate using google distance matrix API on my Chrome but i cann't calculate as you did why ?
and when i try in Mozilla Firefox the script doesnot work too
try using console this is a good for you ,just press f12 and read the error and understating what log tell you
Thanks! excelent.
I'm waiting your new videos
sir it will not display autocomplete address and not be calculate distance between two points
please try to solve my problem
sir, in the video the think . what file and code run that code send quickly to my email
the full code in the description
why no air travel distance?
Will it work without Billing?
no
Bro please upload Taxi fare calculator.
Google Api are free for limited use, after it limits it say " This map is not working properly, Do you own this site..."......?
your code and demo not working Bro. maybe you should change something.
I'm going to show you the demo with me so I can see it
This page can't load Google Maps correctly.
Not working map api calls but not working plz help
Uncaught ReferenceError: google is not defined
عايز كورس خاص من فضلك لو امكن
Where i can find source code calculator.php ? @
not working? might be your key is expired or ur code is wrong or
PK M key expired
Can We Use Pincodes Here ?
Yes you can
is it free to use
code is not working,i added the google map api key from my account, but still its not working.
Open console to show the error
@@web_easy_step Failed to load resource: the server responded with a status of 403 (Forbidden)
test.php:8 Uncaught ReferenceError: google is not defined
at test.php:8
test.php:11 Uncaught ReferenceError: google is not defined
at initialize (test.php:11)
at onload (test.php:65) these are the errors in consol, can you help me? come on skype?
i save the link but i don t know why don t work when i open my html page ty for the help sir
for sure hamza, this the link
bitbucket.org/webeasystep/calculate-distance-between-two-points-google-maps/downloads/
I found no think to download
Can u please send me on gmail hamzaberouayel@gmail.com
sorry hamza i forget to mak it a public ,now you can download from Download repository
Thx so much
hi sir i tried your tutorial but when i calculate the distance it's not showing i dunno why :(
jes merida hi jes , press f12 and open the console tab in the browser then copy the error and paste in the Google or if you want more help paste here, the console is the best way to figure out what happened behind the scene
yes sir already got it thanks for your reply i've done it using the console log. ^_^
good news jes
hi sir i have another question how can i pass the results in php so that i can save all the data to database