adc06 adc06 - 1 year ago 275
AngularJS Question

Any documentation on angular google maps clustering options?

Hi I am using the Angular Google Maps library available here it seems pretty powerful but it lacks exhaustive documentation... I am trying to cluster my markers but I can't find a working example of how to do it. Did anyone manage to do it ?

Answer Source

The question is a bit old, but maybe this can be useful for someone with the same issue.

Here is a simple example from the code I used:

On my controller, I generate a markers array with this structure:

 var markers = new Array();

    for(var i = 0; i < someData.length; i++ ){

        var newMarker = {
            id: parseInt(i),
            latitude: parseFloat(someData[i].latitude),
            longitude: parseFloat(someData[i].longitude),
            showWindow: false,
            title: "Marker"+i,

        newMarker.onClicked = function () {


    $scope.markers = markers;

Then on the view:

<google-map center="" draggable="true" options=map.options zoom="map.zoom">

        <markers models="markers" coords="'self'" doCluster=true click="'onClicked'">

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download