Skip to content
Discussion options

You must be logged in to vote

The following worked for me, I don't know if this is a react thing or a different issue:

marker.getElement().addEventListener("click", () => {
        setTimeout(() => {
          const popup = new maplibregl.Popup()
            .setHTML("<b>popup content</b>")
            .setLngLat(marker.getLngLat())
            .addTo(map);
        }, 0);
      });

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@HarelM
Comment options

Answer selected by stil
Comment options

You must be logged in to vote
2 replies
@HarelM
Comment options

@HarelM
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
need more info Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #5656 on March 23, 2025 12:14.