{"action":"created","issue":{"url":"https://api.github.com/repos/SINTEF-9012/PruneCluster/issues/92","labels_url":"https://api.github.com/repos/SINTEF-9012/PruneCluster/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/SINTEF-9012/PruneCluster/issues/92/comments","events_url":"https://api.github.com/repos/SINTEF-9012/PruneCluster/issues/92/events","html_url":"https://github.com/SINTEF-9012/PruneCluster/issues/92","id":111166026,"number":92,"title":"Remove specific marker for marker.data.ID and popup in a cluster to display the information?","user":{"login":"ivanssa","id":3166174,"avatar_url":"https://avatars.githubusercontent.com/u/3166174?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanssa","html_url":"https://github.com/ivanssa","followers_url":"https://api.github.com/users/ivanssa/followers","following_url":"https://api.github.com/users/ivanssa/following{/other_user}","gists_url":"https://api.github.com/users/ivanssa/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanssa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanssa/subscriptions","organizations_url":"https://api.github.com/users/ivanssa/orgs","repos_url":"https://api.github.com/users/ivanssa/repos","events_url":"https://api.github.com/users/ivanssa/events{/privacy}","received_events_url":"https://api.github.com/users/ivanssa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-13T12:06:43Z","updated_at":"2015-10-15T11:14:28Z","closed_at":null,"body":"Hello, I wonder how to remove a specific marker for marker.data.ID also wanted to know if it is possible to open a popup in a cluster to display the information of all markers of the grouping in Statistics style will be very Granto who can help ."},"comment":{"url":"https://api.github.com/repos/SINTEF-9012/PruneCluster/issues/comments/148355302","html_url":"https://github.com/SINTEF-9012/PruneCluster/issues/92#issuecomment-148355302","issue_url":"https://api.github.com/repos/SINTEF-9012/PruneCluster/issues/92","id":148355302,"user":{"login":"yellowiscool","id":45740,"avatar_url":"https://avatars.githubusercontent.com/u/45740?v=3","gravatar_id":"","url":"https://api.github.com/users/yellowiscool","html_url":"https://github.com/yellowiscool","followers_url":"https://api.github.com/users/yellowiscool/followers","following_url":"https://api.github.com/users/yellowiscool/following{/other_user}","gists_url":"https://api.github.com/users/yellowiscool/gists{/gist_id}","starred_url":"https://api.github.com/users/yellowiscool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yellowiscool/subscriptions","organizations_url":"https://api.github.com/users/yellowiscool/orgs","repos_url":"https://api.github.com/users/yellowiscool/repos","events_url":"https://api.github.com/users/yellowiscool/events{/privacy}","received_events_url":"https://api.github.com/users/yellowiscool/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T11:14:28Z","updated_at":"2015-10-15T11:14:28Z","body":"It is not supported by the API, but it's still possible to do by overloading a method. Basically, you can start with this code:\r\n\r\n```javascript\r\n// overloading BuildLeafletCluster\r\nleafletView.BuildLeafletCluster = function(cluster, position) {\r\n    // Call the existing function first\r\n    var marker = PruneClusterForLeaflet.prototype.BuildLeafletCluster.call(this, cluster, position);\r\n\r\n    // Remove all the default event listeners\r\n    marker.off('click');\r\n\r\n    // Define a new click event listener computing and displaying the popup\r\n    marker.on('click', function() {\r\n        // Get the markers in the cluster O(n)\r\n        var markersInTheCluster = leafletView.Cluster.FindMarkersInArea(cluster.bounds);\r\n\r\n        markersInTheCluster.forEach(function(m) {\r\n            // compute stats\r\n        });\r\n\r\n        var popup = L.popup()\r\n            .setLatLng(marker.getLatLng())\r\n            .setContent('<p>'+markersInTheCluster.length+'</p>')\r\n            .openOn(map);\r\n    });\r\n\r\n    return marker;\r\n};\r\n```\r\n\r\nI should mention than the clustering has no semantic. It's a random grid clustering, for performances reasons. It's probably good enough though."}}