update markercluster after removing markers from array

Yes you can. Creating the map Assuming you have created your MarkerClusterer object something like this: var center = new google.maps.LatLng(10, 20); var map = new google.maps.Map(document.getElementById(‘map’), { zoom: 6, center: center, mapTypeId: google.maps.MapTypeId.ROADMAP }); var markerClusterer = new MarkerClusterer(map); Adding markers You can add multiple markers to it something like this: var markers = … Read more

How can I find the center of a cluster of data points?

The following solution works even if the points are scattered all over the Earth, by converting latitude and longitude to Cartesian coordinates. It does a kind of KDE (kernel density estimation), but in a first pass the sum of kernels is evaluated only at the data points. The kernel should be chosen to fit the … Read more

markerClusterer on click zoom

There has been an update to the MarkerClusterer source code, allowing much easier access to the click event: google.maps.event.addListener(markerCluster, ‘clusterclick’, function(cluster) { // your code here }); where ‘markerCluster’ ist the MarkerCluster object. Inside the function you may also access cluster.getCenter(); cluster.getMarkers(); cluster.getSize(); I use this to switch to a different map type, as I … Read more

Google Maps Api v3, custom Cluster icon

You need to use styles parameter when initializing MarkerClusterer object – the code below shows default styles so if you want to recolour one of the icons just change the relevant url to your image… //set style options for marker clusters (these are the default styles) mcOptions = {styles: [{ height: 53, url: “http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png”, width: … Read more

Styling MarkerClusterer Icons?

What you need to do is use the url to specify which images to use instead of the blue/yellow/red images currently being used. And probably a good idea to include the height and width options too. var clusterStyles = [ { textColor: ‘white’, url: ‘path/to/smallclusterimage.png’, height: 50, width: 50 }, { textColor: ‘white’, url: ‘path/to/mediumclusterimage.png’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)