Searching and Geocoding Addresses using Structured Address Input

The PTV xLocate service enables you to search for and geocode addresses using complete or partial address information given by stuctured address input fields. Using the web serviceA web service represents a communication technology applied in computer networks. It provides an interface described in a machine-processable format, for example WSDL. APIs, it is very simple to integrate this functionality.

Benefits

Using a structured address input data for geocoding has the following benefits:

Prerequisites

Check if the following prerequisites are fulfilled before you start with the use case:

Programming Guide

The following sample illustrates the basic steps that are necessary to geocode addresses via the web service API:

// Search for the address. xlocate.searchLocations({ "$type": "SearchByAddressRequest", "address" : { "country" : "L", "city": "Luxemburg", "street": "Rue Beaumont", "houseNumber": "19" }}, searchCompleted); // Process the results. function searchCompleted(response, exception) { if (response.results instanceof Array) { print('Geocoding succeeded and yielded ' + response.results.length + ' result(s).'); } else { print('Geocoding did not succeed.'); } }

Related Topics