zipcoder

Get zipcode for user location


Keywords
zipcode, location, gmaps, city, country, geocoding, google-maps, maps
License
MIT
Install
npm install zipcoder@0.2.0

Documentation

zipcoder wercker status

Get zipcode, city and country for given coordinates or user location

Install

Bower

$ bower install zipcoder

NPM

$ npm install zipcoder

Usage

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.

zipcoder.location(function(data) { ... });

API Providers

At the moment zipcoder just supports the GoogleMap Geocoding API. In the future this package will support other APIs as well. Feel free to contribute with a pull request.