Maps SDK for Web

tt.services.crossStreetLookup

It converts geographical coordinates into a textual address representation using the TomTom Search API - CrossStreet lookup.

Parameters need to be passed to the constructor. The method go performs the actual call.

The final response from the service is a JSON object with the following structure:

{
  address: {
    buildingNumber: 19,
    streetNumber: 19,
    street: 'N 2nd St',
    streetName: 'N 2nd St',
    crossStreet: 'E SANTA CLARA ST'
    streetNameAndNumber: '',
    speedLimit: '',
    countryCode: 'US",
    countrySubdivision: "'A',
    countrySecondarySubdivision: 'Santa Clara',
    countryTertiarySubdivision: '',
    municipality: 'San Jose',
    postalCode: '95113',
    municipalitySubdivision: "San Francisco Bay Area',
    freeformAddress: 'E SANTA CLARA ST & N 2nd St, San Jose, CA, 95113'
  },
  position: '37.337083, -121.8898'
}

Constructor

tt.services.crossStreetLookup([options])

Example
tt.services.crossStreetLookup({
  key: <Your API key>,
  position: '19.449,51.759'
})
.go()
.then(function(response) {
  console.log(response);
});
Parameters
Name Description
options
Object
default:None

Methods

go( ): Promise

Executes a predefined asynchronous task using the current configuration.

Returns