1
0
Fork 0
forked from 0x2620/oxjs

some more work on map/listmap

This commit is contained in:
rolux 2011-05-22 19:12:21 +02:00
commit 4d9a8537ef
9 changed files with 140 additions and 77 deletions

View file

@ -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

View file

@ -5085,7 +5085,7 @@
"west": 12.4035885
},
{
"code": "NT",
"code": "NTHH",
"dependencies": [],
"dependency": [
"Iraq",