forked from 0x2620/oxjs
some more work on map/listmap
This commit is contained in:
parent
a3c18e57b0
commit
4d9a8537ef
9 changed files with 140 additions and 77 deletions
|
|
@ -93,6 +93,23 @@ Ox.load.Geo = function(options, callback) {
|
|||
return country;
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.getCountryByGeoname <f> Returns a country object for a given geoname
|
||||
(name) -> <o> Country object
|
||||
name <s> Geoname
|
||||
> Ox.getCountryByGeoname('Los Angeles, California, United States').code
|
||||
'US'
|
||||
> Ox.getCountryByGeoname('The Bottom, Saba, Bonaire, Saint Eustatius and Saba').code
|
||||
'BQ'
|
||||
@*/
|
||||
|
||||
Ox.getCountryByGeoname = function(geoname) {
|
||||
return Ox.getCountryByName(
|
||||
geoname.split(', ').pop()
|
||||
.replace('Saint Eustatius', 'Bonaire, Saint Eustatius')
|
||||
);
|
||||
}
|
||||
|
||||
/*@
|
||||
Ox.getCountryByName <f> Returns a country object for a given country name
|
||||
(name) -> <o> Country object
|
||||
|
|
|
|||
|
|
@ -5085,7 +5085,7 @@
|
|||
"west": 12.4035885
|
||||
},
|
||||
{
|
||||
"code": "NT",
|
||||
"code": "NTHH",
|
||||
"dependencies": [],
|
||||
"dependency": [
|
||||
"Iraq",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue