TomTom Maps for JavaScript
    Preparing search index...

    Type Alias POIsModuleFeature

    POIsModuleFeature: Omit<MapGeoJSONFeature, "properties"> & {
        properties: {
            category: string;
            group: string;
            iconID: string;
            id: string;
            name: string;
            priority: number;
        };
    }

    A GeoJSON feature representing a POI from the vector tile map.

    Contains properties specific to Points of Interest including unique identifiers, names, categories, and styling information.

    Type Declaration

    • properties: {
          category: string;
          group: string;
          iconID: string;
          id: string;
          name: string;
          priority: number;
      }

      POI-specific properties from the vector tile.

      • category: string

        POI category identifier.

        Used for styling and filtering purposes. Maps to a specific POI type (e.g., RESTAURANT, HOTEL_MOTEL).

        'RESTAURANT'
        
      • group: string

        Broad category group this POI belongs to.

        Groups similar categories together for easier filtering and styling (e.g., 'Food & Drink', 'Shopping', 'Transportation').

        'Food & Drink'
        
      • iconID: string

        Sprite image ID for this POI's icon.

        References an image within the map style's sprite sheet used to render the POI icon on the map.

        'restaurant-15'
        
      • id: string

        A unique Point of Interest identifier.

        This ID can be used across other TomTom services to fetch additional information about the POI (e.g., via Place by ID service).

        '528009002822995'
        
      • name: string

        Feature name in the native language.

        Displayed in NGT (Neutral Ground Truth) language, which is the native language of each country respectively.

        'Starbucks'
        
      • priority: number

        Display priority of the POI.

        Lower values indicate higher importance. Used by the map renderer to determine which POIs to show when space is limited.

        1 // High priority, 10 // Low priority
        

    These features are returned when interacting with POI layers through events (click, hover, etc.) on the POIsModule.

    poisModule.events.on('click', (feature: POIsModuleFeature) => {
    console.log('POI Name:', feature.properties.name);
    console.log('Category:', feature.properties.category);
    console.log('POI ID:', feature.properties.id);
    });