Getting the user's location with JavaScript (Geolocation API tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ม.ค. 2025

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

  • @Recomeçar-Denovo
    @Recomeçar-Denovo 3 ปีที่แล้ว +3

    Thanks, this API for reverse geolocalization is amazing, i was recently looking for something like that

  • @iamstratos
    @iamstratos 4 ปีที่แล้ว +5

    Simple and on point!

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

    thanks......Love from India

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

    Thank you so much!

  • @ChrisTian-ox5nr
    @ChrisTian-ox5nr 2 ปีที่แล้ว

    This is fire ! Thank You!

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

    Thank so much for your help. I was wondering for your next video if you could show us how to integrate a future daily or hourly forecast of the city. :)

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

    thanks, that was great

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

    Do you know how to change the celsius to farenheight?

    • @DevProTips
      @DevProTips  3 ปีที่แล้ว +2

      openweathermap.org/current
      "For temperature in Fahrenheit use units=imperial For temperature in Celsius use units=metric"

  • @Kurosaka
    @Kurosaka 4 ปีที่แล้ว +2

    Idk how to code but will keep in mind

  • @AhmedOmar-yy9pf
    @AhmedOmar-yy9pf 3 ปีที่แล้ว

    You are really smart

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

    Hi I am looking something to get geolocation of the user to create a region pop-up and redirection. and As a user when landing on a page that is outside my region, I would like to be notified that I am on a page outside my region.I am not looking for paid API. I am looking for something native code using javascript

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

    it seems like getting current location doesn't work any more due to some change on Chrome. Could you suggest any alternative?

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

      There are many alternatives that use the user's IP for geolocation although they might not be as accurate.
      One such example is GeoPlugin: making a request to "www.geoplugin.net/json.gp" should return an object containing the user's city.
      You can find many more similar APIs at github.com/public-apis/public-apis. You can do a find-in-page for "IP geolocation."

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

      @@DevProTips are these free? or is there a limited user

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

    hey i am unable to authoroze to the api key can uh help me out

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

    It worked. Thank you. But can you please tell me how can I access this location outside of the function? I couldn't find any solution.

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

      I found an alternate solution, just wanted to display the location so:
      var location=data.results[0].formatted;
      var message="Location: ";
      document.getElementById("loc").innerHTML = msg+location;

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

      Hi Bharati. Can you help me with your github code link .I am looking something to get geo location of the user t create region pop up and redirection. and As a user when landing on a page that is outside my region, I would like to be notified that I am on a page outside my region.I am not looking for paid API. I am looking for something native code using javascript

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

    great great great job

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

    Bro, source code

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

    Bro ur video is good
    But when ur doing something or u gonna teach something start from starch

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

    No fucking way.....