Get Live User Location - HTML5 Geolocation Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ต.ค. 2024

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

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

    Thanks for watching!
    👉 Source code and steps to map location: openjavascript.info/2022/12/11/map-live-user-location-using-leaflet-js/

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

    this is the best code I have ever seen in internet
    Thanx

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

      Very nice of you to say, I'm flattered. Glad you liked the video :)

  • @justinernest2363
    @justinernest2363 7 หลายเดือนก่อน

    bro is a real master! Great work!

  • @noname-ep9hy
    @noname-ep9hy 5 วันที่ผ่านมา

    You're a great brother, but I have a question. I need to dynamically change the values of longitude and latitude using my GPS/GSM module. How can I do that?

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

    PLEASE HELP!! I keep receiving a Position Unavailable error on location change. I have spent an embarrassing amount of hours on this. Even running the code from live editor produces this error. I am on Edge and Chrome. After location change, an error message appends to the right of timezoneID and locale in 'Sensors' tab stating '...override is already in effect'

  • @fola_azeez
    @fola_azeez 6 หลายเดือนก่อน

    Thank you for this

  • @ShayanFallah-fj4ci
    @ShayanFallah-fj4ci 6 หลายเดือนก่อน +1

    What should i do if i want to place my link in an s src because it gives me error everytime i refresh the site

  • @yadhuvtk
    @yadhuvtk 2 หลายเดือนก่อน

    Is there any method to get accurate location of user?

  • @digitalid69
    @digitalid69 8 หลายเดือนก่อน +1

    how to blocking fake GPS ?

  • @kaltube4817
    @kaltube4817 11 หลายเดือนก่อน

    Well Done

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

    Thank you

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

      You're welcome. Thanks for watching!

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

    Please make a video on how to download files other than images
    Type file

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

      Hi Mohmed, I did already make a video on how to create a client-side download for any file type here that you might find useful: th-cam.com/video/oHGnaE2BQXo/w-d-xo.html
      Hope that helps!

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

      @@OpenJavaScript sorry i mean upload not download sorry 😔

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

      It is true that I upload an image in this tutorial: th-cam.com/video/e13T3O0Iyvc/w-d-xo.html
      But the method for other file types is the same: in the linked tutorial, you would just change the extension to something else (e.g. .txt, .mp3) when you are attaching the file to the FormData object.
      (and you should also set the file input element to only accept that file type setting the 'accept' attribute).

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

      @@OpenJavaScript thank you man

  • @Tony.Nguyen137
    @Tony.Nguyen137 ปีที่แล้ว +1

    Is this geolocation api provided by the browser or is it part of the javascript engine

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

      It is an API provided by the browser that is accessed via JavaScript. It's part of the HTML5 standard and so is supported by all modern browsers. But as I mention in the video, it is good to check for its existence of backwards compatibility.

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

    can this be used for malicious purposes?

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

      You cannot use the geolocation API without the user's permission. Of course, it could still be used for malicious purposes. The way it is set up, it is important that the user only allows geolocation access for trusted websites and apps.
      It is also only works in secure (HTTPS) contexts.

  • @amitpanwar1858
    @amitpanwar1858 7 หลายเดือนก่อน

    Doesn't work on mobile 😢

  • @josephdussatd3607
    @josephdussatd3607 11 หลายเดือนก่อน

    worst teacher ever