Agm-Direction icon indicating copy to clipboard operation
Agm-Direction copied to clipboard

Add a listeners for the mouseover and mouseout event on the direction

Open tvbishan opened this issue 7 years ago • 2 comments

I need to show InfoWindow when mouseover on the direction and close the InfoWindow when mouseout.

How can I achieve this?

tvbishan avatar Oct 11 '18 09:10 tvbishan

Now only ClickEvent can open the InfoWindow.

This is a good feature.

explooosion avatar Oct 11 '18 10:10 explooosion

Hi!

Maybe we can add an option called listeners in the actual markerOptions. Something like this:

<agm-direction
  [markerOptions]="{
    origin: {
      listeners: {
        mouseover: [openInfoWindow]
        mouseout: [closeInfoWindow]
      }
    },
    destination: ...same here...
  }">

Or maybe add another input called markerListeners and do something similar to above:

<agm-direction
  [markerListeners]="{
    origin: {
      mouseover: [openInfoWindow]
      mouseout: [closeInfoWindow]
    },
    destination: ...same here...
  }">

And in conjunction with the sendInfoWindow output this can be done.

I can make a PR if needed

aeroxmotion avatar Feb 22 '19 15:02 aeroxmotion