{"action":"created","issue":{"url":"https://api.github.com/repos/apneadiving/Google-Maps-for-Rails/issues/480","labels_url":"https://api.github.com/repos/apneadiving/Google-Maps-for-Rails/issues/480/labels{/name}","comments_url":"https://api.github.com/repos/apneadiving/Google-Maps-for-Rails/issues/480/comments","events_url":"https://api.github.com/repos/apneadiving/Google-Maps-for-Rails/issues/480/events","html_url":"https://github.com/apneadiving/Google-Maps-for-Rails/issues/480","id":74937651,"number":480,"title":"Clusterer doesn't work for markers with the same coordinates?","user":{"login":"ben-gy","id":6506968,"avatar_url":"https://avatars.githubusercontent.com/u/6506968?v=3","gravatar_id":"","url":"https://api.github.com/users/ben-gy","html_url":"https://github.com/ben-gy","followers_url":"https://api.github.com/users/ben-gy/followers","following_url":"https://api.github.com/users/ben-gy/following{/other_user}","gists_url":"https://api.github.com/users/ben-gy/gists{/gist_id}","starred_url":"https://api.github.com/users/ben-gy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben-gy/subscriptions","organizations_url":"https://api.github.com/users/ben-gy/orgs","repos_url":"https://api.github.com/users/ben-gy/repos","events_url":"https://api.github.com/users/ben-gy/events{/privacy}","received_events_url":"https://api.github.com/users/ben-gy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-10T15:10:55Z","updated_at":"2015-05-11T09:35:35Z","closed_at":null,"body":"Hey there,\r\n\r\ngmaps4rails is great by the way - big thanks to everyone for their time committed to the project.\r\n\r\nMy issue - I've installed gmaps4rails and everything is working well, except for clustering for markers that share the same coordinates.\r\n\r\n![screen shot 2015-05-11 at 1 07 12 am](https://cloud.githubusercontent.com/assets/6506968/7554808/1b3a2870-f77a-11e4-8594-21bbf44ce79e.png)\r\n\r\n![screen shot 2015-05-11 at 1 07 23 am](https://cloud.githubusercontent.com/assets/6506968/7554810/2832e1fc-f77a-11e4-84dc-de9aa40d5363.png)\r\n\r\n![screen shot 2015-05-11 at 1 06 23 am](https://cloud.githubusercontent.com/assets/6506968/7554812/31ed5b8c-f77a-11e4-9443-28719387b577.png)\r\n\r\nHere's my code for generating the markers and map: \r\n```\r\n<script type=\"text/javascript\">\r\n  window.setTimeout(function(){\r\n    var handler;\r\n    handler = Gmaps.build('Google', { markers: { maxRandomDistance: 5, do_clustering: true, clusterer_maxZoom: 20, clusterer_gridSize: 4, randomize: true } });\r\n    handler.buildMap({\r\n      provider: {\r\n        disableDefaultUI: true,\r\n        scrollwheel: false,\r\n        zoomControl: true,\r\n        streetViewControl: true,\r\n        backgroundColor: '#B3D1FF'\r\n      },\r\n      internal: {\r\n        id: 'map'\r\n      }\r\n    }, function() {\r\n      var markers;\r\n      markers = handler.addMarkers(<%=raw @marker.to_json %>); \r\n      handler.bounds.extendWith(markers);\r\n      handler.map.centerOn({\r\n        lat: -25,\r\n        lng: 135\r\n      });\r\n      handler.getMap().setZoom(4);\r\n    }, 200);\r\n  });\r\n</script>\r\n```\r\nThanks in advance for your help :)"},"comment":{"url":"https://api.github.com/repos/apneadiving/Google-Maps-for-Rails/issues/comments/100833328","html_url":"https://github.com/apneadiving/Google-Maps-for-Rails/issues/480#issuecomment-100833328","issue_url":"https://api.github.com/repos/apneadiving/Google-Maps-for-Rails/issues/480","id":100833328,"user":{"login":"ben-gy","id":6506968,"avatar_url":"https://avatars.githubusercontent.com/u/6506968?v=3","gravatar_id":"","url":"https://api.github.com/users/ben-gy","html_url":"https://github.com/ben-gy","followers_url":"https://api.github.com/users/ben-gy/followers","following_url":"https://api.github.com/users/ben-gy/following{/other_user}","gists_url":"https://api.github.com/users/ben-gy/gists{/gist_id}","starred_url":"https://api.github.com/users/ben-gy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben-gy/subscriptions","organizations_url":"https://api.github.com/users/ben-gy/orgs","repos_url":"https://api.github.com/users/ben-gy/repos","events_url":"https://api.github.com/users/ben-gy/events{/privacy}","received_events_url":"https://api.github.com/users/ben-gy/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T09:35:35Z","updated_at":"2015-05-11T09:35:35Z","body":"Hey mate - thanks for the speedy response :)\r\n\r\nI was expecting the clusterer to continue clustering at high zoom levels. Couldn't get that working, but I ended up passing paramters like this and it worked the way I wanted it to: \r\n\r\nGmaps.build('Google', { markers: { randomize: true, maxRandomDistance: 10, clusterer: { maxZoom: 20, gridSize: 40 }}});\r\n\r\nThanks anyway - hopefully this helps anyone who runs into the same problem."}}