TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ReverseGeocodingOptionalParams

    Optional parameters for customizing reverse geocoding requests.

    These parameters allow fine-tuning of the reverse geocoding behavior, including filtering, formatting, and additional data retrieval.

    type ReverseGeocodingOptionalParams = {
        allowFreeformNewline?: boolean;
        geographyType?: GeographyType[];
        heading?: number;
        mapcodes?: MapcodeType[];
        number?: string;
        radiusMeters?: number;
        returnMatchType?: boolean;
        returnRoadUse?: boolean;
        returnSpeedLimit?: boolean;
        roadUses?: RoadUse[];
        view?: View;
    }
    Index

    Properties

    allowFreeformNewline?: boolean

    Controls newline formatting in the returned address.

    When true, the formatted address will contain newline characters. When false or omitted, newlines are converted to spaces.

    false

    geographyType?: GeographyType[]

    Filters results to specific geography entity types.

    Narrows the search to specified geography types (e.g., country, state, city). The response includes the geography ID, which can be used to retrieve the geometry.

    Note: When set, the following parameters are ignored:

    • heading
    • number
    • returnRoadUse
    • returnSpeedLimit
    • roadUse
    • returnMatchType
    heading?: number

    Directional heading of the vehicle in degrees.

    Specifies the travel direction along a road segment to provide direction-aware address information.

    • 0 = North
    • 90 = East
    • 180 = South
    • 270 = West
    heading: 90.5  // Traveling east-northeast
    

    -360

    360

    mapcodes?: MapcodeType[]

    Enables mapcode inclusion in the response.

    Returns a comma-separated list of mapcodes for the location. Mapcodes are short codes representing specific locations within a few meters. Can filter to show only selected mapcode types.

    Available types:

    • Local - Territory-specific mapcode
    • International - Globally valid mapcode
    • Alternative - Alternative mapcode representations
    number?: string

    Street number for enhanced address matching.

    When provided, the response may include:

    • Side of the street (Left/Right)
    • Offset position for the street number
    number: "123"
    
    radiusMeters?: number

    Search radius in meters from the specified position.

    Limits the search area using the provided coordinates as the center point. Must be a positive integer value.

    1

    returnMatchType?: boolean

    Includes match type information in the response.

    When true, the response includes details about how well the geocoder matched the provided coordinates to an address.

    false

    returnRoadUse?: boolean

    Includes road use classification in the response.

    When true and reverse geocoding at street level, returns an array of applicable road use types for the location.

    false

    returnSpeedLimit?: boolean

    Includes speed limit information in the response.

    When true, returns the speed limit at the given location if available.

    false

    roadUses?: RoadUse[]

    Restricts results to specific road use types.

    Filters reverse geocoding results to only include addresses on roads matching the specified use classifications.

    roadUses: ['LimitedAccess', 'Arterial']  // Only highways and major roads
    
    view?: View

    Specifies the geopolitical view for the results.

    Determines how disputed territories and borders are represented in the response.

    Available views:

    • Unified - International view (default)
    • AR - Argentina
    • IN - India
    • PK - Pakistan
    • IL - Israel
    • MA - Morocco
    • RU - Russia
    • TR - Turkey
    • CN - China

    "Unified"