459,7 → 459,7 |
geometry: locationData.geojson, |
elevation: geoLocationData.altitude, |
inseeData: { |
code: geoLocationData.code_zone, |
code: 'FR' === geoLocationData.code_pays ? geoLocationData.code_zone : '', |
nom: geoLocationData.nom |
}, |
osmCountry: locationData.address.country, |
534,8 → 534,8 |
|
Geoloc.prototype.getLocalityFromData = function(localityData) { |
const addressData = localityData.address, |
locationNameType = ['village', 'city', 'locality', 'municipality', 'county'].find(locationNameType => addressData[locationNameType] !== undefined); |
|
locationNameType = ['village', 'city', 'locality', 'municipality', 'county', 'state'].find(locationNameType => addressData[locationNameType] !== undefined); |
if (!locationNameType) { |
return; |
} |