Thank you, Robert Scheitlin and Rickey Fite.
I use LayerList, and table of content of layers are visibled, but don´t understad, why the layer are disabled and can´t turn on and turn off. What am I doing wrong?... .... The code used is:
map = new Map("map", {
basemap: "streets",
center: [-79, -2.89],
zoom: 12
});
layer_fugas = new ArcGISDynamicMapServiceLayer("http://geoportal.etapa.net.ec/arcgis/rest/services/SOAS/Servicio_Fugas/MapServer", {
"showAttribution": true,
"id": "codfuga",
});
sectores = new ArcGISDynamicMapServiceLayer("http://geoportal.etapa.net.ec/arcgis/rest/services/SOAS/Sectores/MapServer", {
"showAttribution": true,
"opacity": 0.30
});
cartografia = new ArcGISDynamicMapServiceLayer("http://geoportal.etapa.net.ec/arcgis/rest/services/EMPRESA/Mapa_base/MapServer", {
"showAttribution": true,
});
map.on("load", function () {
busca_fuga(recuperafuga());
map.infoWindow.resize(150,80);
});
map.addLayers([layer_fugas, sectores, cartografia]);
map.on ('layer-add-result', function(evt){
var myWidget = new LayerList({
map: map,
showLegend: true,
layers: [
{
layer: cartografia,
showSubLayers: true,
showLegend: true,
showOpacitySlider: true,
visibility: true,
id: "CartografÃa"
},
{
layer: sectores,
showSubLayers: true,
showLegend: true,
showOpacitySlider: true,
visibility: true,
id: "Sectores"
},
{
layer: layer_fugas,
showSubLayers: false,
showLegend: true,
showOpacitySlider: true,
visibility: true,
id: "Fugas"
}
]
},"legend");
myWidget.startup();
});
Excuseme, somebody help me???.... Thanks....