I am using Ionic 3 with Javascript Google map API. Here is my code:
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
this.callOrder();
//infowindow.setContent(locations[i]['location']);
//infowindow.open(map, marker);
}
})(marker, i));
this.callOrder(); this is my custom function.
I want to click each and every marker and when I click, this.callOrder(); function will call. But now I am getting an error like:
"TypeError: this.callOrder is not a function. (In 'this.callOrder()', 'this.callOrder' is undefined)"
Anyone can give me an idea or a solution?