TomTom Maps for JavaScript
    Preparing search index...

    Type Alias HasLngLat

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

    Input type representing a geographic point location.

    Accepts various formats for specifying a point location:

    • Position: Raw coordinate array [longitude, latitude]
    • Point: GeoJSON Point geometry
    • Feature<Point>: GeoJSON Feature containing a Point geometry

    Note: Coordinates follow GeoJSON standard with longitude first, then latitude: [lng, lat]

    // As Position array
    const pos1: HasLngLat = [4.9041, 52.3676];

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

    // As Feature
    const pos3: HasLngLat = {
    type: 'Feature',
    geometry: { type: 'Point', coordinates: [4.9041, 52.3676] },
    properties: {}
    };