none
Closing the infobox triggers a Map event. RRS feed

  • Question

  • Hi,

    I have a click event on the map and use a pushpin to denote the location where the user clicks.

    On clicking the pushpin, an infobox is displayed.

    When I try to close the infobox, the click event on the map is triggered and the pushpin location changes.

    How do I close the infobox?

    I want to close the infobox without changing the pushpin location


    Tuesday, January 19, 2016 8:19 AM

Answers

  • Haven't come across this one before. Not sure if it was always there or if it is a new bug. To work around this, add the following code at the top of the event handler for your map click function:

    if(e.originalEvent.target.className == "infobox-close"){
    	return;
    }
    


    http://rbrundritt.wordpress.com

    Tuesday, January 19, 2016 4:09 PM

All replies

  • Haven't come across this one before. Not sure if it was always there or if it is a new bug. To work around this, add the following code at the top of the event handler for your map click function:

    if(e.originalEvent.target.className == "infobox-close"){
    	return;
    }
    


    http://rbrundritt.wordpress.com

    Tuesday, January 19, 2016 4:09 PM
  • Bang on.

    Thank You.

    Wednesday, January 20, 2016 5:26 AM