This is the documentation of version 1.0.0-rc.4. 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>;
            ids?: ValuesFilter<string>;
        };
        icon?: POIIconConfig;
        label?: POILabelConfig;
        microMarkers?: { visible?: boolean };
        minZoom?: number;
        sizeFactor?: number;
        visible?: boolean;
        zoomShift?: number;
    }

    The options of the POIsModule, which control the points of interest in the map style: whether they show, which categories, the icon each category is drawn with, and their look.

    Type Declaration

    • Optionalfilters?: { categories?: ValuesFilter<FilterablePOICategory>; ids?: ValuesFilter<string> }

      Filters for which POIs are displayed, by category and by id. Every filter given must hold.

      If omitted, all POIs are displayed.

      • Optionalcategories?: ValuesFilter<FilterablePOICategory>

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

        The map style knows fewer categories than search does, so each category filters by the style category it maps onto. 'ITALIAN_RESTAURANT' shows or hides every restaurant, and 'BAKERY' every shop.

        // 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']
        }
      • Optionalids?: ValuesFilter<string>

        POI ids to show or hide, per FilterShowMode: the properties.id the module's events and POIsModule.getRenderedFeatures give each POI.

        // Hide one POI
        ids: { show: 'all-except', values: ['528009001852275'] }
    • 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

        Whether the micro markers are shown, never while the POIs are hidden. If unset, they stay as the style ships them.

    • OptionalminZoom?: number

      The zoom level from which POIs appear. The micro markers keep their own. By default, the style's own, 6.

    • OptionalsizeFactor?: number

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

      1
      
    • Optionalvisible?: boolean

      Whether the POI layers are visible.

      true
      
    • OptionalzoomShift?: number

      The shift of 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.

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

    POIsModuleSerializableConfig for the part that survives JSON.