Markers and popups
DOM markers and popups as normal Playwright Locators, and popups anchored on a feature.
await page.getByTestId('toggle-markers').check();// (the demo shows its markers on request)const hq = await map.marker({ at: { lng: 34.84, lat: 32.12 } });// a normal Playwright Locatorawait hq.click();await map.feature({ layer: 'alerts', id: 1 }).click();await expect(map).toHavePopup({ feature: { layer: 'alerts', id: 1 }, text: 'Gas leak' });// open and anchored on the featureawait expect(await map.popup()).toContainText('Severity: high');const p = await map.clientPoint({ lng: 34.82, lat: 32.11 });// lng/lat -> client pixel, for page.mouseawait page.mouse.move(p.x, p.y);map.marker() / map.popup() return normal Locators pinned to their element. Feature actions never click through a marker:
covered pixels are skipped, and a fully covered feature fails with dom-covered, naming the element.