TomTom Maps for JavaScript
    Preparing search index...

    Type Alias POIIconConfig

    Custom icons for the POIs the map style draws, per category.

    categoryIcons takes the entries PlaceIconConfig.categoryIcons does, so one list restyles the map's own POIs and the places a PlacesModule shows. The two differ in two ways: a place takes the entry for its own category first, and only a place takes an entry without an image, as the ID of a sprite icon the map already has.

    const categoryIcons: CustomImage<MapStylePOICategory>[] = [{ id: 'RESTAURANT', image: restaurantSvg }];
    await POIsModule.get(map, { icon: { categoryIcons } });
    await PlacesModule.create(map, { markerType: 'base-map', icon: { categoryIcons } });
    type POIIconConfig = {
        categoryIcons?: NonNullable<PlaceIconConfig["categoryIcons"]>;
    }
    Index
    categoryIcons?: NonNullable<PlaceIconConfig["categoryIcons"]>

    An icon per category, drawn in place of the style's own on the POIs of that category.

    • The map style knows fewer categories than search does. CAFE and CAFE_PUB are one category on the map, so an entry for either reaches both POIs, and the first entry listed wins.
    • The image is scaled with the style's own icons, sizeFactor included, so one the size of a style POI icon keeps the map's density. offsetX and offsetY move it.
    • Entries without an image change no POI.
    • The micro markers of minor POIs keep the style's dots.