Это видео недоступно.
Сожалеем об этом.
Get Live User Location - HTML5 Geolocation Tutorial
HTML-код
- Опубликовано: 14 авг 2024
- 👉 Source code: openjavascript...
⚡ Looking for high-performance, afforable web hosting? We use HostWithLove: bit.ly/3V2RM9Q ❤️
This tutorial shows you how to get the current location of a user by accessing the HTML Gelocation API from JavaScript.
#geolocation #javascript #html5 #tutorial #javascript_tutorial #frontend #webdevelopment #programming
🔔 Subscribe for more tutorials just like this: / @openjavascript
⚡ NEW: Web development courses from Meta Inc. ⚡
Front-End Developer Professional Certificate: imp.i384100.ne...
Back-End Developer Professional Certificate: imp.i384100.ne...
iOS Developer Professional Certificate: imp.i384100.ne...
Meta Android Developer Professional Certificate: imp.i384100.ne...
Meta Database Engineer Professional Certificate: imp.i384100.ne...
Website: openjavascript...
Twitter: / openjavascript
Thanks for watching!
👉 Source code and steps to map location: openjavascript.info/2022/12/11/map-live-user-location-using-leaflet-js/
bro is a real master! Great work!
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'
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
this is the best code I have ever seen in internet
Thanx
Very nice of you to say, I'm flattered. Glad you liked the video :)
Thank you for this
Is there any method to get accurate location of user?
how to blocking fake GPS ?
Well Done
Thank you
You're welcome. Thanks for watching!
Is this geolocation api provided by the browser or is it part of the javascript engine
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.
Please make a video on how to download files other than images
Type file
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: ruclips.net/video/oHGnaE2BQXo/видео.html
Hope that helps!
@@OpenJavaScript sorry i mean upload not download sorry 😔
It is true that I upload an image in this tutorial: ruclips.net/video/e13T3O0Iyvc/видео.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).
@@OpenJavaScript thank you man
can this be used for malicious purposes?
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.
Doesn't work on mobile 😢
worst teacher ever