Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3869 → Rev 3871

/branches/v3.01-serpe/widget/modules/saisie/squelettes/js/tb-geoloc/js/Geoloc.js
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;
}