TomTom Maps for JavaScript
    Preparing search index...

    Function reverseGeocode

    • Convert geographic coordinates into human-readable addresses (reverse geocoding).

      Reverse geocoding translates latitude/longitude coordinates into street addresses, which is essential for location-based applications that need to display addresses from GPS coordinates or map clicks.

      Parameters

      • params: ReverseGeocodingParams

        Reverse geocoding parameters including coordinates

      • OptionalcustomTemplate: Partial<ReverseGeocodingTemplate>

        Advanced customization for request/response handling

      Returns Promise<ReverseGeocodingResponse>

      Promise resolving to the address for the given coordinates

      Common use cases:

      • Tracking applications: Convert GPS coordinates from devices into addresses
      • Map interactions: Display address when user clicks on map
      • Location sharing: Show readable location instead of coordinates
      • Delivery apps: Confirm pickup/dropoff addresses from driver location
      • Asset tracking: Display current location of vehicles or equipment

      Features:

      • Returns complete address hierarchy (street, city, state, country)
      • Supports cross-street results
      • Includes side of street information
      • Provides address ranges for streets
      • Returns multiple result types (street, POI, geography)
      // Get address for coordinates
      const address = await reverseGeocode({
      key: 'your-api-key',
      position: [4.9041, 52.3676] // Amsterdam coordinates
      });
      // Returns: Dam, 1012 Amsterdam, Netherlands

      // Get address with specific street number
      const specificAddress = await reverseGeocode({
      key: 'your-api-key',
      position: [-77.0369, 38.8977], // Washington DC
      number: '1600'
      });
      // Returns: 1600 Pennsylvania Avenue NW

      // Get nearest cross street
      const crossStreet = await reverseGeocode({
      key: 'your-api-key',
      position: [-74.0060, 40.7128], // New York
      returnRoadUse: true
      });