TomTom Maps for JavaScript
    Preparing search index...

    Type Alias POIsModuleConfig

    POIsModuleConfig: MapModuleCommonConfig & {
        filters?: { categories: ValuesFilter<FilterablePOICategory> };
        visible?: boolean;
    }

    Configuration options for the POIsModule.

    Controls visibility and filtering of Points of Interest displayed in the map style.

    Type Declaration

    • Optionalfilters?: { categories: ValuesFilter<FilterablePOICategory> }

      Optional filters for controlling which POI categories are displayed.

      If omitted, all POI categories are displayed by default.

      • categories: ValuesFilter<FilterablePOICategory>

        Category filter configuration.

        By default, all categories are included in the map.

        • Use all_except show mode to hide some categories/groups
        • Use only mode to show only specific categories/groups and hide everything else
        // Show only restaurants and hotels
        categories: {
        show: 'only',
        values: ['RESTAURANT', 'HOTEL_MOTEL']
        }

        // Hide parking
        categories: {
        show: 'all_except',
        values: ['PARKING_GARAGE', 'OPEN_PARKING_AREA']
        }

        // Show only food-related POIs
        categories: {
        show: 'only',
        values: ['FOOD_DRINKS_GROUP']
        }
    • Optionalvisible?: boolean

      Controls the visibility of the POI layers.

      true
      

    POIs are part of the base map vector tiles and include businesses, landmarks, and other points of interest. This configuration allows you to control which categories are visible.

    // Show only restaurants
    const config: POIsModuleConfig = {
    visible: true,
    filters: {
    categories: {
    show: 'only',
    values: ['RESTAURANT']
    }
    }
    };

    // Hide parking-related POIs
    const noParkingConfig: POIsModuleConfig = {
    filters: {
    categories: {
    show: 'all_except',
    values: ['PARKING_GROUP']
    }
    }
    };

    // Show only food and shopping
    const limitedConfig: POIsModuleConfig = {
    filters: {
    categories: {
    show: 'only',
    values: ['FOOD_DRINKS_GROUP', 'SHOPPING_GROUP']
    }
    }
    };