/zipcoder

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

Primary LanguageJavaScriptMIT LicenseMIT

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.