set addressComponents(results) {
        let longName = null, shortName = null,
            addressComponents = {
                postalCode: {longName, shortName},
                streetNumber: {longName, shortName},
                streetName: {longName, shortName},
                city: {longName, shortName},
                district: {longName, shortName},
                stateOrProvince: {longName, shortName},
                country: {longName, shortName}
            };

        for (let i = results[0].address_components.length - 1; i >= 0; i--) {
            let component = results[0].address_components[i];

            if (component.types.indexOf("postal_code") >= 0) {
                addressComponents.postalCode.shortName = component.short_name;
                addressComponents.postalCode.longName = component.long_name;
            } else if (component.types.indexOf("street_number") >= 0) {
                addressComponents.streetNumber.shortName = component.short_name;
                addressComponents.streetNumber.longName = component.long_name;
            } else if (component.types.indexOf("route") >= 0) {
                addressComponents.streetName.shortName = component.short_name;
                addressComponents.streetName.longName = component.long_name;
            } else if (component.types.indexOf("locality") >= 0) {
                addressComponents.city.shortName = component.short_name;
                addressComponents.city.longName = component.long_name;
            } else if (component.types.indexOf("sublocality") >= 0) {
                addressComponents.district.shortName = component.short_name;
                addressComponents.district.longName = component.long_name;
            } else if (component.types.indexOf("administrative_area_level_1") >= 0) {
                addressComponents.stateOrProvince.shortName = component.short_name;
                addressComponents.stateOrProvince.longName = component.long_name;
            } else if (component.types.indexOf("country") >= 0) {
                addressComponents.country.shortName = component.short_name;
                addressComponents.country.longName = component.long_name;
            }
        }

        this._addressComponents = addressComponents;
        this._addressComponents.formattedAddress = results[0].formatted_address;
    }
/**
     *
     * @param {*} results array of results from google geocoding service
     */
@param {*} results array of results from google geocoding service
@param { * } results array of results from google geocoding service
set addressComponents(results) {
        let longName = null, shortName = null,
            addressComponents = {
                postalCode: {longName, shortName},
                streetNumber: {longName, shortName},
                streetName: {longName, shortName},
                city: {longName, shortName},
                district: {longName, shortName},
                stateOrProvince: {longName, shortName},
                country: {longName, shortName}
            };
        for (let i = results[0].address_components.length - 1; i >= 0; i--) {
            let component = results[0].address_components[i];
            if (component.types.indexOf("postal_code") >= 0) {
                addressComponents.postalCode.shortName = component.short_name;
                addressComponents.postalCode.longName = component.long_name;
            } else if (component.types.indexOf("street_number") >= 0) {
                addressComponents.streetNumber.shortName = component.short_name;
                addressComponents.streetNumber.longName = component.long_name;
            } else if (component.types.indexOf("route") >= 0) {
                addressComponents.streetName.shortName = component.short_name;
                addressComponents.streetName.longName = component.long_name;
            } else if (component.types.indexOf("locality") >= 0) {
                addressComponents.city.shortName = component.short_name;
                addressComponents.city.longName = component.long_name;
            } else if (component.types.indexOf("sublocality") >= 0) {
                addressComponents.district.shortName = component.short_name;
                addressComponents.district.longName = component.long_name;
            } else if (component.types.indexOf("administrative_area_level_1") >= 0) {
                addressComponents.stateOrProvince.shortName = component.short_name;
                addressComponents.stateOrProvince.longName = component.long_name;
            } else if (component.types.indexOf("country") >= 0) {
                addressComponents.country.shortName = component.short_name;
                addressComponents.country.longName = component.long_name;
            }
        }
        this._addressComponents = addressComponents;
        this._addressComponents.formattedAddress = results[0].formatted_address;
    }
set addressComponents ( results ) { let longName = null , shortName = null , addressComponents = { postalCode : { longName , shortName } , streetNumber : { longName , shortName } , streetName : { longName , shortName } , city : { longName , shortName } , district : { longName , shortName } , stateOrProvince : { longName , shortName } , country : { longName , shortName } } ; for ( let i = results [ 0 ] . address_components . length - 1 ; i >= 0 ; i -- ) { let component = results [ 0 ] . address_components [ i ] ; if ( component . types . indexOf ( "postal_code" ) >= 0 ) { addressComponents . postalCode . shortName = component . short_name ; addressComponents . postalCode . longName = component . long_name ; } else if ( component . types . indexOf ( "street_number" ) >= 0 ) { addressComponents . streetNumber . shortName = component . short_name ; addressComponents . streetNumber . longName = component . long_name ; } else if ( component . types . indexOf ( "route" ) >= 0 ) { addressComponents . streetName . shortName = component . short_name ; addressComponents . streetName . longName = component . long_name ; } else if ( component . types . indexOf ( "locality" ) >= 0 ) { addressComponents . city . shortName = component . short_name ; addressComponents . city . longName = component . long_name ; } else if ( component . types . indexOf ( "sublocality" ) >= 0 ) { addressComponents . district . shortName = component . short_name ; addressComponents . district . longName = component . long_name ; } else if ( component . types . indexOf ( "administrative_area_level_1" ) >= 0 ) { addressComponents . stateOrProvince . shortName = component . short_name ; addressComponents . stateOrProvince . longName = component . long_name ; } else if ( component . types . indexOf ( "country" ) >= 0 ) { addressComponents . country . shortName = component . short_name ; addressComponents . country . longName = component . long_name ; } } this . _addressComponents = addressComponents ; this . _addressComponents . formattedAddress = results [ 0 ] . formatted_address ; }
@param {*} results array of results from google geocoding service
@param { * } results array of results from google geocoding service