-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Just added the button and a function that prints on console the coordinates when pressing the button mentioned before, alongside an initial catch for the new input on OpenWeather.js first request data
- Loading branch information
Showing
4 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,8 @@ | |
#why-next-min-info { | ||
color: #007bff; | ||
cursor: pointer; | ||
} | ||
|
||
.hover-pointer { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function ShowPositionValues(position){ | ||
let pos = position.coords; | ||
console.log("lat: " + pos.latitude); | ||
console.log("long: " + pos.longitude); | ||
$(".place_field").attr("disabled", true); | ||
$("#city_input").val("Using geolocation info"); | ||
} | ||
|
||
function GetPosition(){ | ||
navigator.geolocation.getCurrentPosition(ShowPositionValues); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters