dimanche 23 avril 2017

my check box does not show the feature layer

here is my code

else if(which == "abc"){  
        var d = (id).toString();  
        d = d.replace("abc", "");  
        query.where = "Name='" + d + "'";  
        console.info(query.where);  
        query.returnGeometry = true;  
        layerC.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (features) {  
          thePoly = features[0].geometry;  
          theExtent = thePoly.getExtent().expand(1); //Zoom out slightly from the polygon's extent  
          map.setExtent(theExtent);  
        }); 

    }
     var text;
     var R = document.getElementById('abc').value;
     var rLyrToggle = dom.byId("rLyr");

     switch(Cpt) {
case "room1":
    on(rLyrToggle, "change", function() {
      building layer.visible = rLyrToggle.checked;

    });
    break;

default:
    text = "No room";

}

    my check box does not show the layer upon checking layer is added to the map but i disable its visibilty 

i want that when combox selected value is equal to the case 1 then the feature is visibile when user check the box




Aucun commentaire:

Enregistrer un commentaire