Struggling to understand the getLocation function

Struggling to understand the getLocation function
0

#1

Feels like I’ve hit a wall with the Weather App Project. Different resources explain different ways to go about pulling your geolocation, but I can’t get the solutions to be compatible across multiple browsers.

What resource did you guys use to understand the function?


#2

I used the HTML5 geolocation API, which seems to work well enough for most browsers. MDN has a very good tutorial for it, and if you use with an API that uses latitude and longitude (say simpleweather.js or open weather map), it becomes easier. Hope this helps!


#3

What have you tried? Can you post some code?