update geo and geo tools (fix for palestine, remove image urls)
This commit is contained in:
parent
3fa654a815
commit
8e490eca2e
5 changed files with 6944 additions and 7547 deletions
|
|
@ -22,10 +22,9 @@ Ox.load.Geo = function(options, callback) {
|
|||
dissolved <[s]> Array of countries the country has been dissolved (merged, renamed or split) into
|
||||
east <n> Longitude of eastern boundary in deg
|
||||
googleName <s|u> Google Maps country name
|
||||
imageURLs <o> Collection of dataURLs
|
||||
marker <s> Map marker
|
||||
imdbCode <s|u> IMDb country code
|
||||
imdbName <s|u> IMDb country name
|
||||
languages <[s]> Array of languages that are spoken in this country more than in any other
|
||||
lat <n> Latitude of the center in deg
|
||||
lng <n> Longitude of the center in deg
|
||||
name <s> Name
|
||||
|
|
@ -155,12 +154,28 @@ Ox.load.Geo = function(options, callback) {
|
|||
return country;
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.getImageByGeoname <f> Returns an image URL for a given geoname
|
||||
(type, size, geoname) -> <s> Image URL
|
||||
type <s> Image type ('flag' or 'icon')
|
||||
size <n> Image width (32, 256, 2048 (flag), 16, 256, 1024 (icon))
|
||||
geoname <s> Geoname
|
||||
@*/
|
||||
|
||||
Ox.getImageByGeoname = function(type, size, geoname) {
|
||||
var country = Ox.getCountryByGeoname(geoname),
|
||||
code = country ? country.code : 'NTHH';
|
||||
return Ox.PATH + 'Ox.Geo/png/' + type + 's/' + size + '/' + code + '.png';
|
||||
};
|
||||
|
||||
/*@
|
||||
Ox.getImageByLanguage <f> Returns an image URL for a given language
|
||||
(type, size, geoname) -> <s> Image URL
|
||||
type <s> Image type ('flag' or 'icon')
|
||||
size <n> Image width (32, 256, 2048 (flag), 16, 256, 1024 (icon))
|
||||
language <s> Language
|
||||
@*/
|
||||
|
||||
Ox.getImageByLanguage = function(type, size, language) {
|
||||
language = language
|
||||
.replace(' languages', '')
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -870,15 +870,15 @@ Ox.Map = function(options, self) {
|
|||
east: northEast.lng(),
|
||||
editable: self.options.editable,
|
||||
fullGeoname: getFullGeoname(data.address_components),
|
||||
geoname: data.formatted_address,
|
||||
id: '_' + Ox.encodeBase32(Ox.uid()),
|
||||
map: that,
|
||||
name: data.formatted_address.split(', ')[0],
|
||||
north: northEast.lat(),
|
||||
south: southWest.lat(),
|
||||
type: getType(data.address_components[0].types),
|
||||
west: southWest.lng()
|
||||
};
|
||||
place.geoname = data.formatted_address || place.fullGeoname;
|
||||
place.name = (place.geoname || place.fullGeoname).split(', ')[0];
|
||||
if (Math.abs(place.west) == 180 && Math.abs(place.east) == 180) {
|
||||
place.west = -179.99999999;
|
||||
place.east = 179.99999999;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue