AnsweredAssumed Answered

hello , How Can I hide an object of type ArcGISDynamicMapServiceLayer ?? I

Question asked by Ing_Lourdes_Olvera on Nov 14, 2014
Latest reply on Dec 10, 2014 by MGuo-esristaff

hello , How Can I hide an object of type ArcGISDynamicMapServiceLayer ??

I used : dynamicLayer.setVisible(false);  but does not work.

this is my code:

 

public void solar(View button){

  String dynamicMapURL = "http://iner.energia.gob.mx:6080/arcgis/restp/services/INER/SOLAR_GLOBAL/MapServer";

  ArcGISDynamicMapServiceLayer dynamicLayer = new ArcGISDynamicMapServiceLayer(

  dynamicMapURL);

  dynamicLayer.setVisible(true);

  if(geocap.getVisibility()==View.GONE){

  geocap.removeAllViews();

      geocap.setVisibility(View.VISIBLE);

      solar();

  }else{

  geocap.setVisibility(View.GONE);

  dynamicLayer.setVisible(false);

  }

  }

Outcomes