none
Map click event issue inside draw region RRS feed

  • Question

  • Hi,

    We have added click event for map. It is fire and working fine but when we draw any region then map click event is not firing. 
    Can anyone has such type of issue and solution for it.

    Thanks!

    Balasaheb  


    Friday, March 18, 2016 8:06 AM

Answers

All replies

  • Can you provide sample code that reproduces this issue? This sounds like a coding error as I can't reproduce this.

    http://rbrundritt.wordpress.com

    Friday, March 18, 2016 3:36 PM
  • Hi Ricky,

    We have added rightclick event of map as shown below.

       Microsoft.Maps.Events.addHandler(_map, 'rightclick', setSelectedAddress);

    We are able to figure it out the issue. This is working fine when we click on map but when we draw the region with the help of drawing tool and when we right click then in target it get ploygon not map so it did not get following method e.target.tryPixelToLocation() so it throws. How we get the location of current click positionin case of ploygon

    Thanks!

    Balasaheb

    Saturday, March 19, 2016 2:29 PM
  • Change e.target to _map

    http://rbrundritt.wordpress.com

    Saturday, March 19, 2016 10:30 PM
  • Hi Ricky,

    Thanks for your trick. It work for us.

    Thanks!

    Balasaheb 


    Balasaheb

    Sunday, March 20, 2016 6:58 AM