Google Geocode API & JavaScript Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ย. 2024
  • In this video we will be working with the Google geocoding API to get all location info including latitude and longitude from an address or even from just the name of a city or state. We will build an application with a Bootstrap 4 form to interact with the API.
    CODE: Code for this video
    www.traversymed...
    Google Map API Tutorial:
    • Google Maps JavaScript...
    SPONSORS:
    DevMountain Bootcamp - goo.gl/6q0dEa
    SUPPORT: We spend massive amounts of time creating these free videos, please donate to show your support:
    www.paypal.me/t...
    / traversymedia
    FOLLOW TRAVERSY MEDIA:
    / traversymedia
    / traversymedia
    / bradtraversy

ความคิดเห็น • 242

  • @RealToughCandy
    @RealToughCandy 7 ปีที่แล้ว +70

    Brad, you rock. Please continue to do these Google API videos! They are *so* helpful and really motivate me to continue my coding journey! I spent a few hours on your first Google API video and am in love with the possibilities! Thank you so much for your great material.

  • @nicode3
    @nicode3 5 ปีที่แล้ว +12

    Most straight forward API tutorial I've seen yet. Somebody buy this dude a beer!

  • @retro04401
    @retro04401 7 ปีที่แล้ว

    Hey man, I am in Dourchester and I just wanted to thank you. This was the most difficult thing that I was working on. The databasing was 10x was easier than the Google tutorials. Thank you again

  • @kevinzhang8974
    @kevinzhang8974 6 ปีที่แล้ว

    Brad, I completed your yesterday and completed this related video today ... as always, I’d appreciated your high quality video and keep me motivated to continue to learn. Thank you!

  • @mathewjohn1630
    @mathewjohn1630 6 ปีที่แล้ว

    Realy helpfull...
    Am a Junior Node Devoloper From India...
    This helped me a lot...
    Thank You...
    Keep The The Things Going...
    All The Best...

  • @justinmoore1473
    @justinmoore1473 6 ปีที่แล้ว

    Dude, you explain things in such an easy to understand way I'm subscribing and looking forward to future videos.

  • @ronnieraney5462
    @ronnieraney5462 6 ปีที่แล้ว

    This is tremendous. I have watched a lot of tutorials lately and you're excellent. For one thing, you don't do corn-ball humor like all those online schools. You also present it well for novice coders. More please.

  • @kevinmcrae1711
    @kevinmcrae1711 4 ปีที่แล้ว

    As someone with little experience working with APIs, this was a great tutorial. Answered a lot of questions I had :)

  • @jaihind1304
    @jaihind1304 4 ปีที่แล้ว +1

    Awesome tutorial Brad. I can't express my gratitude in words. keep doing the good work. Thanks!!

  • @betts12220
    @betts12220 7 ปีที่แล้ว +5

    Half way in. Great vid so far!
    If I may humbly suggest a tutorial I'd love to see something on Vue/Wordpress API. Just something simple like getting the project setup and pulling in posts and featured images would be awesome.

  • @markahofland
    @markahofland 7 ปีที่แล้ว

    Something for your viewers to consider is that the API Key must be unrestricted. I discovered under the returned object the following statement: Browser API key cannot have referrer restrictions when used with this API. Note: Your videos are well produced and explained.

  • @MithileshMusic92
    @MithileshMusic92 6 ปีที่แล้ว

    Thank you, Brad. Always wanted to Learn How to Work with Google Maps. This Helped a Lot, i dont need anything else to learn it, but your Tutorials only :). You Rock

  • @hu316
    @hu316 6 ปีที่แล้ว

    Excellent video, you really helped me consume the APIs, I love how you explain it without turning the tide, and I really appreciate that you teach how to read the documentation correctly, and you use very good practices to improve the code.

  • @Lornecjones
    @Lornecjones 7 ปีที่แล้ว

    I enjoyed this video... It really breaks it down using the API for Google Maps... Adding points to directions would be great also.

  • @dbibbyma
    @dbibbyma 2 ปีที่แล้ว

    OMG! Dude, yeah, you rock. I have been messing around with the Place API and trying to get it to work with no success. It runs with no errors, yet I get no data back. I looked at axios but didn't want to install it via npm. However, think I will try it again by including the library

  • @djordjearsenovic
    @djordjearsenovic 7 ปีที่แล้ว

    Good thing about Chrome console is that you can right click on the object property and copy the whole path. Just to be easier for u, probably u already know this but maybe it could be helpful for someone. Great tutorial as always!

  • @r3n736
    @r3n736 5 ปีที่แล้ว +2

    Next with Vue or React. This series is very helpful since maps are requested by Clients A LOT in the real world for freelancers.

  • @tsheskoelmaximus3784
    @tsheskoelmaximus3784 6 ปีที่แล้ว

    Good Job, @Brad !
    The result of merging this app and the previous one (Google Maps API App) will definitely be a much useful app.

  • @FrancisHamzagic
    @FrancisHamzagic 6 ปีที่แล้ว

    Brad, thank you for all your videos, both on TH-cam and Udemy. It has helped me a lot. Keep the excellent work!

  • @gabrieljumahjumah3135
    @gabrieljumahjumah3135 7 ปีที่แล้ว

    I have loved and followed all through without loosing. Thanks so much for this tutorial

  • @NathanBudd
    @NathanBudd 6 ปีที่แล้ว

    This is awesome! I was after something EXACTLY like this today! I just followed along, and managed to change it to suit my needs.
    Paid for a UDEMY course as a thanks btw. Not going to watch that until I'm through the TH-cam stuff.

  • @emmanuelcbenson
    @emmanuelcbenson 4 ปีที่แล้ว

    Thanks Brad. I have a project where I'm going to implement what I've learnt in these tutorials. Thank you so much.

  • @davidbasil2727
    @davidbasil2727 7 ปีที่แล้ว +21

    Powerlifter + programmer = double like from me.

  • @fauzansulthoni8936
    @fauzansulthoni8936 4 ปีที่แล้ว +1

    I think this is a simple tutorial but contains big value, thaNK yOu

  • @jefdevelops.385
    @jefdevelops.385 3 ปีที่แล้ว

    I wonder how a video so good like this has 34 unlikes. what do people want?

  • @laxmihargunani6450
    @laxmihargunani6450 ปีที่แล้ว

    wow Brad! you just made it so easy to understand!

  • @joshdouglas4157
    @joshdouglas4157 7 ปีที่แล้ว +1

    Another awesome video! I'm hoping for the day you release a "Mega course" for many different technologies with assignment and projects, mentorship etc.. no one seems to teach like you do!

  • @astrobot5813
    @astrobot5813 4 ปีที่แล้ว

    You gave me the possibility to include my first api in my website, thanks a lot for this. I send you a lot of love from France

  • @programmingpython584
    @programmingpython584 4 ปีที่แล้ว

    Your videos always helped me a lot. Btw can you please make a playlist on all the APIs by google like gmail, etc

  • @josepacheco1063
    @josepacheco1063 7 ปีที่แล้ว +5

    Awesome as usual!! Please do a Javascript voice recognition app (like Jarvis, it's getting trending this days. Thank you very much! :D

  • @jonathannorton5707
    @jonathannorton5707 6 ปีที่แล้ว

    Subbed m8, great video. I can't wait until I'm as fluid as you!
    How long have you been coding for?

  • @charlesloehle7998
    @charlesloehle7998 7 ปีที่แล้ว +1

    I keep getting axios is not defined in the console even when i paste in Brad's code? Anybody else?

    • @garaymr
      @garaymr 5 ปีที่แล้ว

      Hello, did you solve it?

  • @nitinbhardwaj9274
    @nitinbhardwaj9274 3 ปีที่แล้ว

    Very nicely explained the complete process in java coding. Thanks bro

  • @deepsleeper1807
    @deepsleeper1807 3 ปีที่แล้ว

    Very Helpful...Even after four years👌

  • @56dburke
    @56dburke 3 ปีที่แล้ว

    This has been great. would love to see more google api videos

  • @noufalbabu549
    @noufalbabu549 6 ปีที่แล้ว

    This is really helpful, I used this in my current project, Thanks Brad.

  • @rasoolbasha5821
    @rasoolbasha5821 5 ปีที่แล้ว

    Brad you are awasome. Excellent explain with code. keep on creating videos.Thank you so much

  • @CleoMG
    @CleoMG 7 ปีที่แล้ว

    Awesome! I'd like to see more tutorials about popular API's like Facebook, Instagram, Twitter and Paypal :D

  • @sivaprasathv3799
    @sivaprasathv3799 7 ปีที่แล้ว

    Thanks Man. Great Insights in the Subject. Great Work

  • @mirstuk
    @mirstuk 7 ปีที่แล้ว

    Thank you so much Brad. This stuff about Google APIs is super-awesome

  • @rajathraghavendra1180
    @rajathraghavendra1180 6 ปีที่แล้ว

    Great tutorial.. The best for Google API on youtube!

  • @joel143ful
    @joel143ful 6 ปีที่แล้ว

    Thanks Brad you are awesome. Keep doing API's im learning alot from your tutoriala

  • @RickyBulalakaw
    @RickyBulalakaw 2 ปีที่แล้ว

    As always, easy to understand and apply. Thanks!

  • @khalil_rahmani
    @khalil_rahmani 7 ปีที่แล้ว +1

    BIG Thanks Brad. I really enjoy your videos 🖒

  • @saberamani4994
    @saberamani4994 7 ปีที่แล้ว +1

    Brad, you are amazing, thank you man. How about creating some series of videos about Javascript and jQuery validations in a real example?

  • @linkonline3395
    @linkonline3395 6 ปีที่แล้ว +6

    Thank you teacher , and what if I store all the address in my database and I want all of them to be lat/lng so that I can put marker on the map.How to do that sir ?

    • @wingsaber629
      @wingsaber629 5 ปีที่แล้ว

      Were you able to figure that out?store all the address in my database and I want all of them to be lat/lng so that I can put marker on the map

  • @grjerry
    @grjerry 7 ปีที่แล้ว +1

    Thank you very much!! Greetings from Greece. ΑΞΙΟΣ!!

  • @caroldanvers265
    @caroldanvers265 6 ปีที่แล้ว

    Thanks I had lots of fun doing this project!!

  • @nelsonparreira4326
    @nelsonparreira4326 7 ปีที่แล้ว +1

    Great video! How about using places? Like using the current location of the user to see the closest store. I saw it in a website but can't figure out how to do it. In fact, it shows the closest store of a brand. It will be nice.

  • @mappiness381
    @mappiness381 3 ปีที่แล้ว

    dude, that was one superb tutorial. thanks !

  • @martin-xq7te
    @martin-xq7te 7 ปีที่แล้ว

    Hi Brad, great video. But what about a video showing how to select areas on a map with the mouse drag and retreat this info to a form or better still a simple google spreadsheat

  • @pickandhoop
    @pickandhoop 5 ปีที่แล้ว

    card-block was substituted by card-body in bootstrap 4

  • @MrSambra22
    @MrSambra22 6 ปีที่แล้ว

    good job brother . one think i couldn't find and will be great if you can do a tutorial about is how to fix the gray area when dragging the map (load tiles while dragging map ) . thank you

  • @pogrammerinthehouse8643
    @pogrammerinthehouse8643 3 ปีที่แล้ว +1

    I am not able to create my billing account of GCC..thus I am not able to get API credentials.Anyone knows what I need to do now?

  • @ghezalmohammedamine7057
    @ghezalmohammedamine7057 7 ปีที่แล้ว +1

    you are king, thank you brad, Y'as pas une Moyen On api to know the altitude and longitude of a point on maps

  • @rahulmallik8508
    @rahulmallik8508 6 ปีที่แล้ว

    Nice i really enjoyed the tutorial and thank's for the clear concept.

  • @doitadele
    @doitadele 7 ปีที่แล้ว

    Great video! Just what I've needed :) Thank you

  • @krishnaranshinge4406
    @krishnaranshinge4406 3 ปีที่แล้ว +1

    I am getting error Uncaught ReferenceError:axios is not defined at HtmlFormElement.geocode
    error is at axios.get('maps.googleapis.com/maps/api/geocode/json',

  • @larry3274
    @larry3274 ปีที่แล้ว

    Brad, just a quick question, I have VFP database table with my customer information. The address is part of the record. Is there a way to scan that table to show markers on the map of all my customers? thanks...great videos.....

  • @shareapps3248
    @shareapps3248 6 ปีที่แล้ว

    excellent explanation .... u have a knack Man

  • @sucayono8848
    @sucayono8848 4 ปีที่แล้ว

    Great tutorial as always!. Thank you very much!

  • @echochillASMR
    @echochillASMR 4 ปีที่แล้ว

    Hi thank you for this. Can we get full residential/commercial addresses on user location so they can select their address, rather than typing their home/business address?

  • @Mehedihasan-rahat
    @Mehedihasan-rahat ปีที่แล้ว

    Very very smart web developer 👍👍👍👍

  • @leonpowell8964
    @leonpowell8964 7 ปีที่แล้ว

    Great video. Answered a lot of questions. Any chance you can show how to put the variables iinto a mysql table using php. Cheers

  • @martin66778
    @martin66778 4 ปีที่แล้ว

    this is great so easy to follow

  • @f5057
    @f5057 7 ปีที่แล้ว

    Thank you for this valuable video. I would like to ask you how can we display that into a map so that the place we are searching for will be displayed rather that just view the information

  • @swatantrasinha8657
    @swatantrasinha8657 4 ปีที่แล้ว

    Hi Brad
    Thanks a lot
    can you please suggest how to protect the key means the key will be visible in network tab and can be used by others so anyway we can protect it ?
    Actually in my project I am doing ajax call taking address text in search textbox and getting Lat-Long
    so its all client side hence key is visible in network tab ...
    Please suggest Sir ..Thanks in advance

  • @argelpamintuango1956
    @argelpamintuango1956 3 ปีที่แล้ว

    if I catch the longitude and latitude of address, what property in google api's response should I use? because the location property in it is not accurate when I place it to the static map

  • @buystore4598
    @buystore4598 7 ปีที่แล้ว

    Great as always.
    Do you have any premium course of how to create a cms or even a complete blog using PHP without a framework?

  • @Elon40k
    @Elon40k 3 ปีที่แล้ว +1

    Please correct me if I'm wrong, but as of October 2021 using this API costs money. $5.00 for each 1,000 requests made.

    • @KingFuYouTube
      @KingFuYouTube ปีที่แล้ว

      well it asks to enable billing now... as of Jan 2023...

  • @meghnaguha919
    @meghnaguha919 5 ปีที่แล้ว

    that was helpful....thanks a ton. what i want to implement is autocomplete, mark the location on the map and return the lat-lng to be stored in the database. really stuck in it. can you come up with more help?

  • @craiggazimbi
    @craiggazimbi 3 ปีที่แล้ว

    Thank you so much Brad!! Big thumbs up

  • @jared394
    @jared394 6 ปีที่แล้ว

    Did you ever do the reverse geocoding video? Looking how to cleanly get a city name back for any set of coordinates. Thanks!

  • @mamniki7107
    @mamniki7107 7 ปีที่แล้ว

    thanks for video. i think your teaching about working with javascript is better than google api :-)

    • @TraversyMedia
      @TraversyMedia  7 ปีที่แล้ว +1

      Thanks. Yeah I wanted to highlight practices in writing JavaScript as well. Glad you liked it

  • @ajazmiah
    @ajazmiah 7 ปีที่แล้ว

    Do you think you can make a video on Bootcamp, how useful its is, the difficulty and the job opportunity and such?

  • @sylviogiraldes
    @sylviogiraldes 4 ปีที่แล้ว

    Excellent video. Tks Brad

  • @TheHarokidz
    @TheHarokidz 7 ปีที่แล้ว +2

    Great tutorial, keep it up

  • @emmanuel4699
    @emmanuel4699 7 ปีที่แล้ว +1

    Thank You, Sir. You're the best

  • @shravyashravya4081
    @shravyashravya4081 3 ปีที่แล้ว

    hi is the video for the incorporation for both up (display nearby facilities based on user input address)? thnx in advance!

  • @evobe
    @evobe 7 ปีที่แล้ว

    Thanks so much for this. Helped a lot. What if I wanted to return two addresses and values? Right now I get axios to return the address values in my form but I also want to geocode another address at the same time. Would I have to create a second geocode function or am I better off using the waypoint api?

  • @mightyleguan1451
    @mightyleguan1451 7 ปีที่แล้ว

    great video, could you please make a tutorial about the MERN stack? I am currently learning react and express but i have no idea how to combine them.

  • @Nekomosh004
    @Nekomosh004 4 ปีที่แล้ว

    This is just awesome. Thank you so much!

  • @samalhajari4846
    @samalhajari4846 6 ปีที่แล้ว

    How can you put the lng and lat from this video to create a marker from the previous video? Tried a lot with no luck. It would be great if you could show how to do that

  • @Alex-xw5bc
    @Alex-xw5bc 4 ปีที่แล้ว

    Did you ever make a video where you combine this with the previous google map video you built?

  • @siyabonganzulwana3316
    @siyabonganzulwana3316 7 ปีที่แล้ว

    Lovely Video Travery, Im working on a similar thing, but now im Using React. The Idea is that when you submit your address the results is an updated Map, with the inserted location. Im kinda stuck with the events part as I have to Components, Map and Input Component.

  • @ovidiublaga1
    @ovidiublaga1 4 ปีที่แล้ว

    Thank you so much for this. Can you make something like: take your geolocation and then add two points on the map and then calculate the closest distance from you to one of the two points. Thanks

  • @ayushsrivastava7637
    @ayushsrivastava7637 5 ปีที่แล้ว

    I made one request and the console gives me an error of "OVER_QUERY_LIMIT". what should I do now? Please help me out!

  • @ovidiublaga1
    @ovidiublaga1 4 ปีที่แล้ว

    Hello , with the parameters sent with axios, how can we restrict the searches for a certain country only. I have added componentRestrictions: {
    country: 'RO'
    } to params object and it does not work. Can you guys help me? thanks

  • @abode802
    @abode802 4 ปีที่แล้ว

    Hi, I have a question. How could I check if the geocoded address is matched to the correct location on the map ,the status or the confidence ? is there any function can be applied for this purpose in JavaScript or Python .
    Thanks in advance.

  • @alfredamante4480
    @alfredamante4480 2 ปีที่แล้ว

    can i ask how to get your exact location without entering your exact address and make it required to know the exact location of the user who submit it?

  • @gholamrezafalahzade8370
    @gholamrezafalahzade8370 6 ปีที่แล้ว

    thank you this video help me to resolve my problem.

  • @mohamedshafraz9861
    @mohamedshafraz9861 4 ปีที่แล้ว

    Thank you very much brother, this very much helpful

  • @denniszenanywhere
    @denniszenanywhere 6 ปีที่แล้ว

    Great tutorial. Question: How do I geocode more specific establishments like type of restaurants? How do I code that?

  • @williamsammut5251
    @williamsammut5251 6 ปีที่แล้ว

    Great Vid !!! Thanks a lot !!! Was very helpful !!!

  • @refractedphoton
    @refractedphoton 5 ปีที่แล้ว

    Is there any way to do a google API geocode from an address without having any external javascript. I.e. without having the axios javascript? I ask because with server-side PHP there is no need for 3rd-party code.

  • @ramonbriceno7861
    @ramonbriceno7861 7 ปีที่แล้ว +1

    You rock man! Congratulations

  • @edwardju1010
    @edwardju1010 6 ปีที่แล้ว

    Many thanks from a desperate late 20s.

  • @khalil_rahmani
    @khalil_rahmani 7 ปีที่แล้ว +1

    Brad..After watching ur Graph API Video, it would be great if you can teach us about working with Facebook Graph API + Vue JS. Thank you MAN.

  • @sushovanmallick6833
    @sushovanmallick6833 6 ปีที่แล้ว

    awesome work brad

  • @kapsola2710
    @kapsola2710 4 ปีที่แล้ว

    what would the code look like if you wish to add the use Time Zone API Google to the form.? Thank you