forked from 0x2620/oxjs
better sorting of geonames
This commit is contained in:
parent
6ad45105af
commit
32b2da184a
4 changed files with 49 additions and 19 deletions
|
|
@ -155,6 +155,18 @@ Ox.load.Geo = function(options, callback) {
|
|||
return country;
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.reverseGeoname <f> Reverses a geoname
|
||||
@*/
|
||||
Ox.reverseGeoname = function(geoname) {
|
||||
return geoname
|
||||
.replace('Bonaire, Saint Eustatius and Saba', 'Bonaire Saint Eustatius and Saba')
|
||||
.split(', ')
|
||||
.reverse()
|
||||
.join(', ')
|
||||
.replace('Bonaire Saint Eustatius and Saba', 'Bonaire, Saint Eustatius and Saba');
|
||||
};
|
||||
|
||||
callback(true);
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue