search-map

Micro Fronted displaying markers with hotel information like image, price and link on a map using Google Dynamic Maps api.

The search-map component displays search results on a Google map.

Screenshots

Map with offers

Usage

Add the following script tag to your web page to load the microfrontend. Note: This is required only once per webpage, even when you embed multiple instances of the microfrontend.

<script src="https://nonprod.cloud.tui.com/osp/ao/ui/search-map/current/search-map.esm.js" defer></script>

Add the following HTML code anywhere in your webpage at the position where you want the microfrontend to show. You can create multiple instances of the microfrontend.

<tui-search-map
locale="VALUE"
market="VALUE"
show-consent="VALUE">

</tui-search-map>

Examples

  • Basic example

    <tui-search-map
    market="se"
    locale="sv-SE"
    category-icon="tui">

    </tui-search-map>

Attributes

This microfrontend accepts the following attributes:

NameDescriptionValuesDefaultRequired
ab-test-show-mini-map

Hide desktop searchmap and show map in the modal A/b test ACCOONLY-7487

no
category-icon

Icon that should be used for TUI rating

no
locale

Locale to be used within UI

da-DK, de-AT, de-CH, de-DE, en-GB, en-IE, fi-FI, fr-BE, fr-CH, nb-NO, nl-BE, nl-NL, sv-SEyes
market

Market to which API calls would be sent

at, be, ch, de, dk, fc, fi, ie, nl, no, se, ukyes
price-format

Should component display total price or price per person

pricePerPerson, totalPriceno
show-consent

Shows a consent dialog for using Google Maps for Central region

yes
theme

Theme to be used within UI

firstchoice, tui-lightno
tracking-id

The id to be used for click tracking

no

Events

This microfrontend emits the following events:

EventSchema

tui.search-map-ui.rendered

Emitted when component is initially rendered.

type: boolean

tui.search-map-ui.viewport-updated

Emitted when map viewport got updated.

type: object

tui.search-map-ui.marker-clicked

Emitted when marker on the map was clicked by the user

type: object

tui.search-map-ui.map-clicked

Emitted when map was clicked by the user

type: object

tui.search-map-ui.tracking

Tracking event

type: object