views:

20

answers:

0

I am using marker clusterer in v3, since i have milions of points to show on map. I have three types of colored markers and created clusters for them. Now i want to add three checkboxes to select a particular type of markers and cluster it. Till now i succeeded but when i first create cluster and then select a particular type cluster it show error "object does not support this method". The line which gives error is "

step 1. show markers for(var markers in markerArrayGreen){ markerArrayGreen[markers].setVisible(true); }

step 2. cluster is created... var mcOptionsgreen={ maxZoom:10, gridSize: 50, imagePath: "./images/green" }; markerClusterGreen = new MarkerClusterer(map, markerArrayGreen, mcOptionsgreen); google.maps.event.addListener(markerArrayGreen, 'clusterclick',function() { //markerArrayYellow.getMarkers(); });

when i do step 1 -> step 2. every thing goes fine, But when i do step2 first then step 1, its give me error.

Can you sugggest me on this.