I'm using the webcomponent google-map-marker in a Polymer element created by me. I want to catch the click on it to do something afterwords in my component, so I tried this on my template:
<div horizontal layout flex style="height: 400px;">
<div class="panel-contents" vertical layout flex>
<google-map flex map="{{map1}}" latitude="45.5601451" longitude="-73.7120832">
<google-map-marker latitude="45.5601451" longitude="-73.7120832" map="{{map1}}" clickEvents="true" google-map-marker-click="{{markerClicked}}" ></google-map-marker>
</google-map>
</div>
</div>
and in the script part
Polymer({
markerClicked: function () {
//this is never triggered!
},
});
Is there a way of doing this? Thanks in advance.
PS: Btw, what I originally wanted to do was close all the other markers InfoWindow if they are visible, before showing the one of the just clicked marker. If someone has an idea of a better workaround for it, that would be awesome.