difference between closeInfoWindow with click on X img and by code isOpen = false
See original GitHub issueHi,
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:
- we have infoWindow [A] and infoWindow [B] closed in the map.
- open the infoWindow [A] in map.
- by code set the infoWindow [B] to
isOpen = true
and infoWindow [A] tofalse
. 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:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this doesn’t make sense, since if you are changing isOpened, you may as well trigger whatever mechanism you have
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 actionclose
programmatically orclose
by UI user action (I provided already one solution with the needed change to achieve it).