nlaplante/angular-google-maps — pull request #261 by kurtschwarz (2014-02-15 17:09:07+00:00)
Title: MarkerClusterer event binding via Markers directive.

Okay! Sorry about the previous PR, I definitely messed it up. I hacked this code together pretty quickly, and I'm sure there is a better way of doing things but it does get the job done.

I've modified the Markers directive to allow binding of the MarkerClusters events, such as; click, mouseover, mouseout, clusteringbegin and clusteringend.

Here is a quick usage example:

**controller/mapCtrl.js**
```js
define([
], function mapCtrlModule() {
'use strict';

return [
'$scope',
function mapCtrl($scope) {
$scope.map = {
center: {
latitude: 43.653218,
longitude: -79.383173
},

zoom: 12,

markers: [{
latitude: 43.653218,
longitude: -79.383173
}, {
latitude: 43.654118,
longitude: -79.384373
}, {
latitude: 43.654718,
longitude: -79.378234
}, {
latitude: 43.654218,
longitude: -79.382234
}, {
latitude: 43.657218,
longitude: -79.382234
}, {
latitude: 43.657218,
longitude: -79.389234
}],

cluster: true,

clusterOptions: {
gridSize: 60,
zoomOnClick: false,
ignoreHidden: true,
minimumClusterSize: 2
},

clusterEvents: {
'click': function onClusterClick(cluster) {
console.debug('onClusterClick( cluster )', cluster);
},

'mouseout': function onClusterMouseOut(cluster) {
console.debug('onClusterMouseOut( cluster )', cluster);
},

'mouseover': function onClusterMouseOver(cluster) {
console.debug('onClusterMouseOver( cluster )', cluster);
}
}
};
}]
});
```

**partial/_map.html**
```html

```