locked
Pushpin Mouse Events - Get Pushpin Object RRS feed

  • Question

  • I'm migrating from v7 to v8.  I have pushpins set up with handlers to throw events for mouseover, click, etc.  In v7, in each respective handler function, I could just do for instance...

    var myPushpin = this.target;

    ...and this would give me access to the pushpin object that fired the event.

    With v8, this doesn't seem to be available to me.  e.targetType returns 'pushpin' and I can get the location (lat/lon) to verify it is valid but I can't seem to use this.target or e.target as a reference to the pushpin object itself that fired the event.

    Perhaps I'm just missing something simple or do I need a different angle of attack with v8?

    (By the way, when I'm on the MSDB v8 'Pushpin Class' help topic (https://msdn.microsoft.com/en-us/library/mt712674.aspx) and click on the 'MouseEventArgs' link that jumps me to the v7 page (https://msdn.microsoft.com/en-us/library/gg406731.aspx) so I don't even know if I'm looking at documentation that correctly applies to what I'm trying to do.)


    Thursday, July 7, 2016 4:27 PM

Answers

  • e.target is available in V8 when adding mouse events to pushpins. Here is the doces for the V8 mouse event args: https://msdn.microsoft.com/en-us/library/mt748664.aspx

    I'll take a look at the doc linking issue in MSDN. Unfortunately the MSDN system is a pain and automatically links things by name. So docs that have the same name, although in completely different sections of the site, can sometimes be automatically linked in correctly. Will try and fix the issue for these docs.


    [Blog] [twitter] [LinkedIn]

    Thursday, July 7, 2016 6:18 PM

All replies

  • e.target is available in V8 when adding mouse events to pushpins. Here is the doces for the V8 mouse event args: https://msdn.microsoft.com/en-us/library/mt748664.aspx

    I'll take a look at the doc linking issue in MSDN. Unfortunately the MSDN system is a pain and automatically links things by name. So docs that have the same name, although in completely different sections of the site, can sometimes be automatically linked in correctly. Will try and fix the issue for these docs.


    [Blog] [twitter] [LinkedIn]

    Thursday, July 7, 2016 6:18 PM
  • Good stuff, that's exactly what I needed.  Thank you.
    Thursday, July 7, 2016 6:50 PM