Subversion Repositories eFlore/Applications.cel

Rev

Rev 3869 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3869 Rev 3871
Line 457... Line 457...
457
    const detail = {
457
    const detail = {
458
        centroid: locationData.centroid,
458
        centroid: locationData.centroid,
459
        geometry: locationData.geojson,
459
        geometry: locationData.geojson,
460
        elevation: geoLocationData.altitude,
460
        elevation: geoLocationData.altitude,
461
        inseeData: {
461
        inseeData: {
462
            code: geoLocationData.code_zone,
462
            code: 'FR' === geoLocationData.code_pays ? geoLocationData.code_zone : '',
463
            nom: geoLocationData.nom
463
            nom: geoLocationData.nom
464
        },
464
        },
465
        osmCountry: locationData.address.country,
465
        osmCountry: locationData.address.country,
466
        osmCountryCode: geoLocationData.code_pays,
466
        osmCountryCode: geoLocationData.code_pays,
467
        osmCounty: locationData.address.county,
467
        osmCounty: locationData.address.county,
Line 532... Line 532...
532
    }
532
    }
533
};
533
};
Line 534... Line 534...
534
 
534
 
535
Geoloc.prototype.getLocalityFromData = function(localityData) {
535
Geoloc.prototype.getLocalityFromData = function(localityData) {
536
    const addressData = localityData.address,
-
 
Line -... Line 536...
-
 
536
    const addressData = localityData.address,
537
        locationNameType = ['village', 'city', 'locality', 'municipality', 'county'].find(locationNameType => addressData[locationNameType] !== undefined);
537
 
538
 
538
        locationNameType = ['village', 'city', 'locality', 'municipality', 'county', 'state'].find(locationNameType => addressData[locationNameType] !== undefined);
539
    if (!locationNameType) {
539
    if (!locationNameType) {
Line 540... Line 540...
540
        return;
540
        return;