TomTom Maps for JavaScript
    Preparing search index...

    Type Alias Mapcode

    Mapcode representation of a location.

    A mapcode is a short, memorable code representing a geographic location, 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

    Properties

    code?: string

    The mapcode without territory.

    Two groups of letters/digits separated by a dot (e.g., "4J.P2"). Uses the response language/alphabet. Not present for International mapcodes.

    fullMapcode: string

    Complete mapcode including territory if applicable.

    Always unambiguous. Format: "TERRITORY CODE" for local, just "CODE" for international.

    territory?: string

    Territory code for local mapcodes.

    Present only for Local and Alternative mapcodes. Uses Latin alphabet. Not present for International mapcodes.

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