OpenStreetMap:
$.getJSON('https://nominatim.openstreetmap.org/reverse', { lat: position.coords.latitude, lon: position.coords.longitude, format: 'json', }, function (result) { console.log(result); });
GeoNames:
$.getJSON('https://secure.geonames.org/countryCode', { lat: position.coords.latitude, lng: position.coords.longitude, type: 'JSON', username: 'demo' }, function (result) { console.log(result); });
rahulroy9202 Oct 28 '15 at 10:22 2015-10-28 10:22
source share