Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schickling/zipcoder
Get zipcode, city and country for given coordinates or user location
https://github.com/schickling/zipcoder
city country geocoding google-maps location maps zipcode
Last synced: 22 days ago
JSON representation
Get zipcode, city and country for given coordinates or user location
- Host: GitHub
- URL: https://github.com/schickling/zipcoder
- Owner: schickling
- License: mit
- Created: 2014-04-28T12:22:28.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-08-13T17:10:12.000Z (over 10 years ago)
- Last Synced: 2025-01-09T13:11:32.281Z (28 days ago)
- Topics: city, country, geocoding, google-maps, location, maps, zipcode
- Language: JavaScript
- Homepage:
- Size: 240 KB
- Stars: 11
- Watchers: 0
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
zipcoder [![wercker status](https://app.wercker.com/status/ce8c11af12d22a8fad41177c7cd8fe9e/s/ "wercker status")](https://app.wercker.com/project/bykey/ce8c11af12d22a8fad41177c7cd8fe9e)
========Get zipcode, city and country for given coordinates or user location
## Install
#### Bower
```sh
$ bower install zipcoder
```#### NPM
```sh
$ npm install zipcoder
```## Usage
```js
zipcoder.coordinates(52.519444, 13.406667, function(data) {
console.log(data);
// {
// lat: 52.519444,
// lng: 13.406667,
// zipcode: '10178',
// city: 'Berlin',
// country: 'Germany',
// }
});
```#### User location
Uses browser geolocation to determine the current user location.
```js
zipcoder.location(function(data) { ... });
```## API Providers
At the moment `zipcoder` just supports the [GoogleMap Geocoding API](https://developers.google.com/maps/documentation/geocoding/). In the future this package will support other APIs as well. Feel free to contribute with a [pull request](https://github.com/schickling/zipcoder/compare/).