How to get the location of a user using Javascript in the code playground? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 10

How to get the location of a user using Javascript in the code playground?

Code playground is not supporting the navigator.geolocation.getCurrentPosition(); command

23rd Jul 2018, 7:45 AM
Aanisha Bhattacharyya
Aanisha Bhattacharyya - avatar
7 Respostas
+ 11
Okay and Thanks again CalviÕ² .
23rd Jul 2018, 9:14 AM
Aanisha Bhattacharyya
Aanisha Bhattacharyya - avatar
+ 5
If you run web code from code playground, it only return you Sololearn US server location. https://code.sololearn.com/Wlj0cY7ZAlTs/?ref=app
23rd Jul 2018, 8:41 AM
CalviÕ²
CalviÕ² - avatar
+ 5
There is no way to get the current location?? CalviÕ²
23rd Jul 2018, 8:43 AM
Aanisha Bhattacharyya
Aanisha Bhattacharyya - avatar
+ 5
Thanks CalviÕ² but I was trying to make something which people could access from code playground itself.
23rd Jul 2018, 8:50 AM
Aanisha Bhattacharyya
Aanisha Bhattacharyya - avatar
+ 4
put the code to online webpage would get the location of the visitors.
23rd Jul 2018, 8:44 AM
CalviÕ²
CalviÕ² - avatar
+ 1
There is no way to get user information from code playground, because of the web execution is on Sololearn VM, before feed the HTML back to your phone webview.
23rd Jul 2018, 8:58 AM
CalviÕ²
CalviÕ² - avatar
0
we cant get the location of users through sololearn but if you create a blog or website then you can get. !!
26th Aug 2018, 10:35 AM
B.Dada khalander
B.Dada khalander - avatar