On Sep 18, 11:34 am, Tee Cee <[email protected]> wrote: > not a bad thought but dont that does not work either > maybe I some how need to remove the markerCluser over totatally > maybe it has logic to manager marker & it does not want to conflict > with another applet adding marlers to the map ? > i tried myMap.orderCluster=null nope as well :(
It worked for me. You must be doing something else wrong, as you haven't provided a link to your map, we can't tell what... http://www.geocodezip.com/v3_GoogleEx_markerclusterer_unclusterB.html >> although I don't know why you would want to do this... > well i cluster the map to start with & i have a list of detail > info in scrolling div for each marker, if you cllick an icon > representing an indivdudal marker I want to remove/or hide the > markercluster view and show the markers associated to the > indivdual markers so that the 'drill down' gived the user a > more clear picture w/o the clutters of markerCluster If you have enough markers to need the clusterer, unclustering all of them will make the performance of the map unacceptable, particularly in IE. -- Larry > > On Sep 18, 7:44 am, "[email protected]" <[email protected]> > wrote: > > > > > On Sep 17, 6:00 am, Tee Cee <[email protected]> wrote: > > > > any ways how do you uncluster a map that has been MarkerClusterer > > > and redisplay a simple marker view > > > > assume a master js object myMap that is a global refernce to all map > > > goodies eg > > > var myMap = { > > > Icons: null, > > > map: null, //new google.maps.Map > > > bounds: null, //new google.maps.LatLngBounds() > > > geocoder: null, //new google.maps.Geocoder(); > > > trafficInfo: null, //new google.maps.TrafficLayer(); > > > markerCluster:null, //new MarkerClusterer > > > markerOverlays : [], //array of marker we add to map > > > > } > > > > assume a marker array of valid marker's is displayed on a map > > > and a control is added to toggle between MarkerClusterer view > > > and a a simple marker view > > > The issue is that when showOverlays(myMap.orderOverlays); > > > is called the markers wont show back up on the map > > > after the call to myMap.orderCluster.clearMarkers() ; > > > but I can iterrate the array of markers & they all look good > > > in the sense that each element in the marker array has the normal > > > marker properties > > > Its like when the orginal marker array myMap.markerOverlay is passed > > > to the the > > > MarkerClusterer construtor some magic juju is done to the normal > > > array of markers > > > OR This is the wrong way to toggle markers & MarkerClusterer > > > > in code fir the control handkler we have > > > > if (myMap.orderCluster) { > > > if (myMap.orderCluster.getTotalClusters() > 0) { > > > if (myMap.orderCluster.getMap()) { > > > myMap.orderCluster.clearMarkers() ; > > > myMap.orderCluster = null; > > > showOverlays(myMap.orderOverlays); > > > } > > > else > > > myMap.orderCluster.setMap(myMap.Map); > > > } > > > else { > > > var mcOptions = { gridSize: 50, maxZoom: 15 }; > > > myMap.orderCluster = new MarkerClusterer(myMap.map, > > > myMap.orderOverlays, mcOptions); > > > } > > > > } > > > else { > > > var mcOptions = { gridSize: 50, maxZoom: 15 }; > > > myMap.orderCluster = new MarkerClusterer(ecMap.map, > > > myMap.orderOverlays, mcOptions); > > > } > > > > function showOverlays(aOverlays) { > > > if (aOverlays) { > > > //alert(aOverlays.length); > > > for (i in aOverlays) { > > > aOverlays[i].setMap(myMap.map) > > > Try aOverlays[i].setOptions({map:myMap.map, visible:true}); > > > although I don't know why you would want to do this... > > > -- Larry > > > > } > > > } > > > > }- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
