Z
Z
zlodiak2017-11-24 13:43:33
Angular
zlodiak, 2017-11-24 13:43:33

How to implement a right click handler on a marker?

If you use the agm module in angular, then it becomes possible to hang a handler for pressing the left mouse button on the marker. To do this, you can use the markerClick directive. It is described here .
But it is not clear how to hang a handler for pressing the right mouse button on the marker. This possibility is not described in the above documentation.
Moreover, if you use the Angular directive (contextmenu), then it simply will not work (there is no map reaction to the event). Even if somehow it will work, then the $event passed through it will contain the usual information for a normal click on the block, but it will not have specific properties such as marker coordinates

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question