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

    Type Alias POIsModuleConfig

    POIsModuleConfig: MapModuleCommonConfig & {
        filters?: { categories: ValuesFilter<FilterablePOICategory> };
        icon?: POIIconConfig;
        label?: POILabelConfig;
        microMarkers?: { visible?: boolean };
        minZoom?: number;
        sizeFactor?: number;
        visible?: boolean;
        zoomShift?: number;
    }

    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>

        Categories or category groups to show or hide, per FilterShowMode.

        // Show only restaurants and hotels
        categories: {
        show: 'only',
        values: ['RESTAURANT', 'HOTEL_OR_MOTEL']
        }

        // Hide parking
        categories: {
        show: 'all-except',
        values: ['PARKING_GARAGE', 'OPEN_CAR_PARKING_AREA']
        }

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

      Custom icons per POI category, in place of the style's own.

    • Optionallabel?: POILabelConfig

      The look of the POI labels.

    • OptionalmicroMarkers?: { visible?: boolean }

      The small dot markers the style draws for low-priority POIs at high zoom.

      • Optionalvisible?: boolean

        Shows or hides the micro markers; never shown while the POIs are hidden. Unset: as the style ships them.

    • OptionalminZoom?: number

      Zoom level from which POIs appear; the micro markers keep their own. Unset: the style's own, 6 on TomTom styles.

    • OptionalsizeFactor?: number

      Size multiplier for the POI icons and their labels, 1 being the style's own. Composes with the StylingFoundationsModule labels.sizeFactor and symbols.sizeFactor, which reach the POIs too.

      1
      
    • Optionalvisible?: boolean

      Controls the visibility of the POI layers.

      true
      
    • OptionalzoomShift?: number

      Shifts the zoom at which each POI appears: positive is later and sparser, negative earlier and denser.

      0
      

    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']
    }
    }
    };