How to get user Geo location using useGeoLocation hook in ReactJS

Поділитися
Вставка

КОМЕНТАРІ • 33

  • @symdev8002
    @symdev8002 4 роки тому +2

    Good hook for geo location api. Thanks a ton.

  • @twitan-
    @twitan- 3 роки тому

    Fantastic Video, been struggling on this all day.

  • @mubasharali3328
    @mubasharali3328 3 роки тому

    It really helped me. Thanks for your clean code.

  • @lazycoderlee
    @lazycoderlee 3 роки тому

    Wow, simply super - explanation was clear. Thank you for sharing.

  • @davidadewale8466
    @davidadewale8466 2 роки тому +1

    Nice tutorial... What if I want to get the cordinates with the user input. I mean user should input thier address and the cordinates should display. Thanks

    • @jordiwebstyle6629
      @jordiwebstyle6629 2 роки тому

      i have the same problem , because i not want use GoogleMaps API , i'm looking for a free alternative API

  • @amirthaamirtha9989
    @amirthaamirtha9989 2 роки тому

    In the error i need the cached position values..how to get this one??

  • @ejimmichael712
    @ejimmichael712 2 роки тому

    Great video. thank you very much

  • @gavin8535
    @gavin8535 3 роки тому +1

    How do you get city and state name???

  • @funnyvlogs69
    @funnyvlogs69 2 роки тому

    Super for all concept

  • @hirazaffar5880
    @hirazaffar5880 3 роки тому

    hey can you intergrate wikitude plugin to make it as ar app?

  • @sanjanaperera269
    @sanjanaperera269 2 роки тому

    so we using this in react right? what about in the nodejs backend?

    • @programmingwithprem
      @programmingwithprem  2 роки тому

      This is based on the browser API and can not be used on NodeJS.
      On nodeJS you find the location using the client IP address and below node package. This might need you to purchase a paid plan.
      github.com/geoip-lite/node-geoip

  • @240ping.24fps
    @240ping.24fps 2 роки тому

    I used this in my project. Everything's working fine in all browsers except for in Firefox browser, it is saying position acquisition timed out. I am using the latest firefox browser and also played with the options part. Nothing's working. Can you tell me where this might be going wrong. Found where it's going wrong. Its working!!!

    • @ShahrukhAzeem
      @ShahrukhAzeem 2 роки тому

      In Firefox, geolocation only works with https routes. On location host you must enable https for geolocation.

  • @idevbrandon
    @idevbrandon 2 роки тому +1

    Thank you!

  • @zeeshankazi6561
    @zeeshankazi6561 3 роки тому

    location hook unresponsive while switching b/w pages in application any idea about it

  • @jordiwebstyle6629
    @jordiwebstyle6629 2 роки тому +1

    thanks very much !!!!

  • @syedshow811
    @syedshow811 3 роки тому

    if a user accidentally block the permission, how to make user allow without clearing the browser settings

  • @aymaneu3723
    @aymaneu3723 Рік тому

    thanks bro its working!!!

  • @naghmans433
    @naghmans433 3 роки тому

    it really helped me

  • @estebanramirezlopez9256
    @estebanramirezlopez9256 2 роки тому

    Hello, the accuracy is very high, is there any way to reduce this number?

    • @programmingwithprem
      @programmingwithprem  2 роки тому +1

      You can try to pass "enableHighAccuracy: false" in options. But not sure if this will give you the expected result.

  • @ashishthakkar3284
    @ashishthakkar3284 3 роки тому

    how to get country code???

  • @ashishthakkar3284
    @ashishthakkar3284 3 роки тому +1

    this is great code

  • @monikakalaitzidi9009
    @monikakalaitzidi9009 3 роки тому

    amazing tutorial, many thanks!!!!

  • @oyunboldganbold5923
    @oyunboldganbold5923 3 роки тому

    Thanks a lot

  • @hexanolmethane3562
    @hexanolmethane3562 3 роки тому

    cool tutorial

  • @navjotsingh999
    @navjotsingh999 2 роки тому

    tysm!!!

  • @anridev24
    @anridev24 3 роки тому

    Thanks