angular-mapboxgl-directive icon indicating copy to clipboard operation
angular-mapboxgl-directive copied to clipboard

Popup on hover

Open mm-ns opened this issue 7 years ago • 3 comments

Hi @Naimikan

Do you have a way in your directive to show up a popup when you hover over a marker ? (i use glLayers and glSources like so :

{
                id: 'medium-circle',
                source: 'medium-circle',
                type: 'circle',
                paint: {
                    'circle-radius': 7,
                    'circle-color': '#FFFFFF',
                    'circle-opacity': 1,
                    'circle-stroke-width': 3,
                    'circle-stroke-color': '#E2E70D'
                },
                popup: {
                    enabled: true,
                    onClick: {
                        message: '<div class="metar-popup"><p>HELLO</p></div>'
                    }
                }
            }

Works on click but i need to understand how to do it on hover with your directive.

mm-ns avatar Oct 09 '17 04:10 mm-ns

HI @mm-ns!

I'm working on that feature. I will update a new version soon.

Thank you!

Naimikan avatar Oct 10 '17 08:10 Naimikan

Cool :) Thanks! So far I have a workaround where I check on mousemove if im on one of my markers and then opening a popup.

mm-ns avatar Oct 10 '17 09:10 mm-ns

Cool :) Thanks! So far I have a workaround where I check on mousemove if im on one of my markers and then opening a popup.

Hi @mm-ns, can you help me? How did you determine that element on 'mousemove' is marker? Did you compare coordinates?

aleksmaksiuta avatar Jul 09 '19 16:07 aleksmaksiuta