Click or drag to resize

Telogis.GeoBase.GeoCoder.GeoCodeAddress

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
GeoCodeAddress Class

Represents a LatLon and a physical address, returned as the result of GeoCoding.

Functions
NameDescription
getCity ()

Gets the city name of the GeoCoder.GeoCodeAddress by guessing the list-value that represents it.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('City containing address: ' + callback[0].getCity());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

String - The city of the address.

getComponent (Number index)

Safely gets an indexed value in the list of components specifying the GeoCoder.GeoCodeAddress.

JavaScript
function myTestFunction() {
    var street = 0;
    var city = 1;
    var region = 2;
    var postcalcode = 3;
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Postal code containing address: ' + callback[0].getComponent(postcalcode));
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Arguments
  • index (Number) - The index in the address array to get the value of.

Returns

String - The string value of the requested field, or undefined if it could not be found.

getConfidence ()

Gets a value measuring the routing engine's confidence in returning this GeoCoder.GeoCodeAddress.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Confidence that the geocoder has found the correct address: ' + callback[0].getConfidence());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

Number - A decimal value between 0 and 1, with 1 representing the highest confidence.

getCountry ()

Gets the name of the country that the GeoCoder.GeoCodeAddress is located in.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Country of address: ' + callback[0].getCountry());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

String - The address's country.

getLocation ()

Finds the latitude-longitude coordinates of the geocoded location.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('LatLon location of address: ' + callback[0].getLocation());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

Number - The location of the address.

getMatchType ()

Gets the match-type of the GeoCoder.GeoCodeAddress.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Search method used to locate: ' + callback[0].getMatchType());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

String - A string identifying the primary search method type that was used to find this address.

getMaxNumber ()

Gets the maximum value of the range of street numbers between which this GeoCoder.GeoCodeAddress lies.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Maximum street number: ' + callback[0].getMaxNumber());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

Number - The maximum street number of the address.

getMinNumber ()

Gets the minimum value of the range of street numbers between which this GeoCoder.GeoCodeAddress lies.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Minimum street number: ' + callback[0].getMinNumber());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

Number - The minimum street number of the address.

getNumber ()

Gets the street number of the GeoCoder.GeoCodeAddress.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Number of address: ' + callback[0].getNumber());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

Number - The street number of the address, or a value less than one if none was available.

getPostalCode ()

Gets the postal code of the GeoCoder.GeoCodeAddress by guessing the list-value that represents it.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Post code of address: ' + callback[0].getPostalCode());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

String - The address's postal code.

getRegion ()

Gets the state in which the GeoCoder.GeoCodeAddress is situated by guessing the list-value that represents it.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Primary region of address: ' + callback[0].getRegion());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

String - The address's region.

getStreet ()

Gets the street name of the GeoCoder.GeoCodeAddress by guessing the list-value that represents it.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Street name of address: ' + callback[0].getStreet());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

String - The street name of the address.

toString ()

Represents a list-stored address by joining the given values together with commas.

JavaScript
function myTestFunction() {
    Telogis.GeoBase.GeoCoder.geoCode ('20 Enterprise, Aliso Viejo', 'USA', function (callback) {
        // Callback function begins
        if (callback.length > 0) {
            alert ('Found address string: ' + callback[0].toString());
        } else {
            alert ('No address found');
        }
    }, function (error) {alert(error)});
};
Returns

String - A meaningfully ordered string representation of the GeoCoded address.