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

    Type Alias POICategoryGroup

    POICategoryGroup: keyof typeof poiCategoryGroups

    The name of a POI category group.

    The groups are predefined sets of related POI categories, for convenient filtering. Each group contains multiple MapStylePOICategory values that share a common theme. With a group, a single filter value shows or hides multiple related POI types.

    Available groups:

    • FOOD_DRINKS_GROUP - Restaurants, cafes, fast food, wineries, etc.
    • SHOPPING_GROUP - Stores, malls, markets, supermarkets, etc.
    • TRANSPORTATION_GROUP - Airports, train stations, bus stops, ferry terminals, etc.
    • HEALTH_GROUP - Hospitals, clinics, pharmacies, doctors, dentists, etc.
    • PARKING_GROUP - Parking garages and open parking areas
    • HOLIDAY_TOURISM_GROUP - Tourist attractions, museums, beaches, scenic views, etc.
    • EV_CHARGING_STATIONS_GROUP - Electric vehicle charging stations
    • GAS_STATIONS_GROUP - Gas and petrol stations
    • ACCOMMODATION_GROUP - Hotels, motels, camping grounds, etc.
    • ENTERTAINMENT_GROUP - Cinemas, theaters, nightlife, casinos, etc.
    • SPORTS_LEISURE_GROUP - Stadiums, sports centers, swimming pools, golf courses, etc.
    • EDUCATION_GROUP - Schools, universities, libraries, cultural centers
    • GOVERNMENT_GROUP - Government offices, courthouses, embassies, police, fire stations

    Filter to show only food-related POIs:

    poisModule.updateConfig({ filters: { categories: { show: 'only', values: ['FOOD_DRINKS_GROUP'] } } });
    

    Hide parking and gas stations:

    poisModule.updateConfig({
    filters: { categories: { show: 'all-except', values: ['PARKING_GROUP', 'GAS_STATIONS_GROUP'] } }
    });

    Combine multiple groups for tourism use case:

    const tourismFilter: ValuesFilter<FilterablePOICategory> = {
    show: 'only',
    values: [
    'HOLIDAY_TOURISM_GROUP',
    'ACCOMMODATION_GROUP',
    'FOOD_DRINKS_GROUP',
    'ENTERTAINMENT_GROUP'
    ]
    };