lat-lng
📍 🌎 A micro-service for physical address -> latitude & longitude
When you need latitude and longitude, avoid Google's API limits by using this endpoint instead. lat-lng
uses Google's API to accurately resolve latitude and longitude with caching .
Example
JavaScript is used here because it's popular and straightforward to reason about. Any language could be used:
Request:
fetch('https://lat-lng.now.sh/?address=Portland,OR')
.then(res => res.json())
.then(res => console.log(res));
Response:
{
"formattedAddress": "Portland, OR, USA",
"lat": 45.5230622,
"lng": -122.6764816
}
Other valid examples:
License
MIT © Dawson Botsford