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

    Type Alias Mapcode

    The mapcode of a location, a short and memorable code designed as an alternative to coordinates.

    // Local mapcode (requires territory)
    const localMapcode: Mapcode = {
    type: 'Local',
    fullMapcode: 'NLD 4J.P2',
    territory: 'NLD',
    code: '4J.P2'
    };

    // International mapcode (no territory needed)
    const intlMapcode: Mapcode = {
    type: 'International',
    fullMapcode: 'VHXGB.4J9W',
    code: 'VHXGB.4J9W'
    };
    type Mapcode = {
        code?: string;
        fullMapcode: string;
        territory?: string;
        type: MapcodeType;
    }
    Index
    code?: string

    The mapcode without territory.

    It has two dot-separated groups of letters or digits, such as "4J.P2", in the response language and alphabet. International mapcodes don't have it.

    fullMapcode: string

    The complete mapcode, including the territory if applicable.

    Its format, always unambiguous, is "TERRITORY CODE" for local and "CODE" for international mapcodes.

    territory?: string

    The territory code, in the Latin alphabet.

    It is present only for Local and Alternative mapcodes, not for International ones.

    The type of mapcode (Local, International, or Alternative).