Questions about Store Locator customization

Hi, as the title says, I am trying to implement both changes to my code:

The most important one is the ability to open the location on hover, not just when clicking on the pins. Is this possible?

Thanks a lot for the assistance.

2 Likes

Hey there and welcome aboard, @Ignacio_Brito :waving_hand:

  1. You’d like to change the color of the active marker, right? If so, please add this code to the Custom CSS field on the Style tab of your widget’s settings:
.global-styles,
[class*="elfsight_map"].active [class*="marker__Container-sc"] svg path {
  fill: red !important;
}

If you’d like to see this functionality as a built-in option, please upvote this Wishlist idea - Option to change the color of the cohose marker

  1. To display the location popup on marker hover, please add this code to the Custom JS field on the Settings tab of your widget’s settings:
document.addEventListener("mouseover", ({ target }) => {
  const marker = target.closest(".maplibregl-marker");
  marker?.click();
});

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


Please try it out and let me know if the solutions worked :wink:

1 Like

hi @Max thanks foryour reply.

the custom JS code you added works but the issue is that the pin jumps to the center of the screen on hover when teh card open and it is super jumpy and the UX is not really great, you can see it on this, here you can see it. any way to fix that so the position doesnt changes?

2 Likes

Hi @Ignacio_Brito :waving_hand:

Yep, please let me check it with the devs. I’ll get back to you once I have their response :slightly_smiling_face:

2 Likes

Hi there, @Ignacio_Brito :waving_hand:

Unfortunately, there is no way to implement this behavior, since opening the popup always changes focus to the center.

I hope this explains things.

If you have any questions left, we’re always here to help :slightly_smiling_face:

1 Like

@Max oh that is too bad, is there any way to have the pop info to pop over the pin instead of opening the side location card? as that is something the client wants implemented on their site? thanks!

2 Likes

Do you mean something like this?

1 Like