question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

difference between closeInfoWindow with click on X img and by code isOpen = false

See original GitHub issue

Hi,

Needed! We need to be able to make a difference between a user action that close the infoWindow and the code that set the variable isOpen to false.

Steps for the problem:

  1. we have infoWindow [A] and infoWindow [B] closed in the map.
  2. open the infoWindow [A] in map.
  3. by code set the infoWindow [B] to isOpen = true and infoWindow [A] to false. This will trigger infoWindowClose for infoWindow [A] even if i didn’t click the X img.

In the infoWindowClose callback i can’t make a difference.

a quick fix (tried it directly in my node_modules/@agm => working) would be: in the file src/core/directives/info-window.ts line 131 on master replace with this.infoWindowClose.emit({isImgXClicked: true});

Thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Sep 2, 2019

this doesn’t make sense, since if you are changing isOpened, you may as well trigger whatever mechanism you have

0reactions
nasreddineskandranicommented, Sep 2, 2019

this doesn’t make sense

Please! read carefully the issue. An example about the problem is provided. I can’t remember why i needed that. The issue is too old.

I am not asking to stop using the same mechanism but adding more info (to the same mechanism) about the source of the action close programmatically or close by UI user action (I provided already one solution with the needed change to achieve it).

Read more comments on GitHub >

github_iconTop Results From Across the Web

difference between closeInfoWindow with click on X img and ...
Hi, Needed! We need to be able to make a difference between a user action that close the infoWindow and the code that...
Read more >
Google Map API v3 ~ Simply Close an infowindow?
With the v3 API, you can easily close the InfoWindow with the InfoWindow.close() method. You simply need to keep a reference to the...
Read more >
Info Window | Maps JavaScript API - Google Developers
Creates an info window with the given options. An InfoWindow can be placed on a map at a particular position or above a...
Read more >
Auto close InfoWindow when another marker is pressed, or ...
When you click on an info window at the moment, it will stay open when you move the map (and when an InfoWindow...
Read more >
Session problem loading external map page - phpBB
What is the most recent action performed on your board? ... =false;}else{google.maps.event.trigger(me.marker_,"click",e);cAbortEvent(e);}}}) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found