This is the documentation of version 1.0.0-rc.1. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Function reverseGeocode

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

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

      Parameters

      Returns Promise<ReverseGeocodingResponse>

      The address for the given coordinates.

      Use it to convert GPS coordinates from tracked devices into addresses, display the address when the user clicks on the map, show a readable location instead of coordinates, confirm pickup/dropoff addresses from the driver's location, or display the current location of vehicles or equipment.

      It returns the complete address hierarchy (street, city, state, country) and the result type (address, street, or geography). You can narrow results to administrative areas with geographyTypes, and match streets by direction with heading.

      // Get address for coordinates
      const address = await reverseGeocode({
      position: [4.9041, 52.3676] // Amsterdam coordinates
      });
      // Returns: Dam, 1012 Amsterdam, Netherlands

      // Get the address matched along a given travel direction
      const specificAddress = await reverseGeocode({
      position: [-77.0369, 38.8977], // Washington DC
      heading: 90 // Traveling east
      });

      // Get the containing municipality instead of the street
      const municipality = await reverseGeocode({
      position: [-74.0060, 40.7128], // New York
      geographyTypes: ['Municipality']
      });