TomTom Maps for JavaScript
    Preparing search index...

    Type Alias HasLngLat

    HasLngLat: [number, number] | Position | Point | Feature<Point>

    Input type representing a geographic point location.

    Accepted forms:

    • [longitude, latitude] — plain coordinate pair (GeoJSON Position)
    • Point — GeoJSON Point geometry object
    • Feature<Point> — GeoJSON Feature wrapping a Point; Place satisfies this directly

    Coordinates always follow the GeoJSON convention: longitude first, then latitude.

    Because Place is a Feature<Point>, any search result can be passed wherever HasLngLat is accepted — for example as a position bias on a follow-up search, or as a route waypoint.

    // Plain coordinate pair
    const pos1: HasLngLat = [4.9041, 52.3676];

    // GeoJSON Point geometry
    const pos2: HasLngLat = { type: 'Point', coordinates: [4.9041, 52.3676] };

    // GeoJSON Feature<Point> — e.g. a Place from search results
    const pos3: HasLngLat = searchResults.features[0];