Store Locator: How to display location popup on pin hover

Want the popup with the location info to automatically appear on pin hover? Here is a solution from our awesome devs:

document.addEventListener("mouseover", ({ target }) => {
  const marker = target.closest(".maplibregl-marker");
  marker?.click();
});

Add this script to the Custom JS field on the Settings tab of your Store Locator widget’s settings and you’ll be fine :wink:

Watch this video to see how it works:


Note: Custom JS doesn’t function in the preview mode, so you can check the result right on your website or through the Share Link


Guys, was this solution helpful? Let us know in the comments :slightly_smiling_face:

1 Like