Skip to content

Instantly share code, notes, and snippets.

View pedrohma's full-sized avatar
:shipit:

Pedro Henrique Arthur pedrohma

:shipit:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pedrohma on github.
  • I am pedrohma (https://keybase.io/pedrohma) on keybase.
  • I have a public key whose fingerprint is 7ADB 90E9 6AFC 74DC 996E CCCD 703A D933 3F9B F084

To claim this, I am signing this object:

@pedrohma
pedrohma / geoLocation.js
Last active June 2, 2023 11:18
Getting Zip Code by GeoLocation using Google Maps API
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
alert("Sorry, but Geolocation is not supported by this browser.");
}
}
function showPosition(position) {
var lat = position.coords.latitude;