API DOCUMENTATION

On
Adds a listener for events of a specified type occurring on features in a specified style layer.

map.on(type, layerId, listener)

Parameter

[example : on]

map.on('click', function (e) {

    console.log('Click >>>>>>>',e)  //Map Click

})

  map.on('mouseover', 'fatosmarker', function (e) P

    if(e.originalEvent.toElement.id){  //marker mouseover

       console.log('Mouseover>>>>>>>',e)

    }

})