MCPcopy Create free account
hub / github.com/codemistic/Web-Development / getlocation

Function getlocation

CountriesAPI_JS/whereami.js:1–10  ·  view source on GitHub ↗
(lattitude, longitude)

Source from the content-addressed store, hash-verified

1const getlocation = function (lattitude, longitude) {
2 fetch(`https://geocode.xyz/${lattitude},${longitude}?geoit=json`)
3 .then((respose) => respose.json())
4 .then((data) => {
5 console.log(data);
6 console.log(
7 ` the country name is ${data.country} and city is ${data.city}`
8 );
9 });
10};
11getlocation(27.7172, 85.324);

Callers 1

whereami.jsFile · 0.85

Calls 1

logMethod · 0.45

Tested by

no test coverage detected