locked
How to distinguish between the mouse left buttons and right button RRS feed

  • Question

  • In bing map v7, the event have "isPrimary" but it's not in bing map v8, so how to distinguish it?
    Monday, March 6, 2017 5:12 AM

Answers

  • If you only need the mousedown event on the map and not on shapes, you can add a standard JavaScript mousedown event to the map div.

    [Blog] [twitter] [LinkedIn]

    • Proposed as answer by Ricky_Brundritt Wednesday, March 8, 2017 4:19 AM
    • Marked as answer by s000rd Thursday, March 9, 2017 2:51 AM
    Wednesday, March 8, 2017 4:19 AM

All replies

  • There are separate click and rightclick events. There is no "isPrimary" option for the other mouse events at this time. This is the first request we have had for this in V8. I'll add a feature request for it.

    [Blog] [twitter] [LinkedIn]

    Monday, March 6, 2017 5:25 PM
  • Ricky:

        I use "mousedown" event, it will occurs when left/right mouse click, but I just want to fire it only left click.  do you have any good idea?

    Tuesday, March 7, 2017 3:19 AM
  • If you only need the mousedown event on the map and not on shapes, you can add a standard JavaScript mousedown event to the map div.

    [Blog] [twitter] [LinkedIn]

    • Proposed as answer by Ricky_Brundritt Wednesday, March 8, 2017 4:19 AM
    • Marked as answer by s000rd Thursday, March 9, 2017 2:51 AM
    Wednesday, March 8, 2017 4:19 AM