Smart Geo
Smart Geo is data from Open Data providers compiled into easy to use JavaScript objects.
Table Of Content ## Features
- Multiple languages (Currently only supports English, French and German).
- Country Database
- Region Database (Currently only for Canada and the United States).
Smart Geo does not require a database, but instead, uses JSON files.
## Installation ### Installation with npmnpm install smart-geo
bower install smart-geo
Database of all countries in the world.
Properties
- Names
- Short Code (Alpha-2 code)
- Code (Alpha-3 code)
- Latitude
- Longitude
- Bounding Box
- Currency
- Continent
- Population
- Area
- Capital
- Timezone
Examples
Get a list of all countries.
var geo = ; var countries = geocountryRepository;console;
Get a country name in english or othe languages.
var geo = ; var country = geocountryRepository;console;console;
Order by country name in any language.
var geo = ; var countries = geocountryRepository;countries;console;
Database of all States, Federal Districts and Territories in the United States, Provinces and Territories in Canada.
Properties
- Name
- Code (Alpha-2 code)
- Country
- Type
- Latitude
- Longitude
- Bounding Box
Examples
Get a list of all regions in the US.
var geo = ; var country = geocountryRepository;console;
Get region name and type in english.
var geo = ; var regions = georegionRepository;for var i = 0 len = regionslength; i < len; ++i console;