AnsweredAssumed Answered

How to Hide and Show ClusterLayer on Demand

Question asked by BEHSEINI on Sep 5, 2015
Latest reply on Sep 8, 2015 by tsellste

I followed This API Tutorial to create Cluster Points on the map. Now I would like to have a function to hide them. I already tried like?

 

clusterLayer.hide();

 

but it didn't work! I also tried to bind the clusterLayer to a GraphicsLayer like below

 

  var clayer = new esri.layers.GraphicsLayer();
  clayer.add(clusterLayer);
  clayer.hide();

 

 

but still not working

After hours of working I find a sample on google at this Demo doing the job of switching between Points and Cluster but it is supper complicated to me!

Can you please let me know how I can hide and show the cluster layer on demand?

Outcomes