for ( i = 0; i < tasks.length; i++) {//Use 'for' instead of 'for...in' so you can sync tasks with defTasks
try {
idParams.layerIds = visibleLayers;
tasks.execute(idParams, defTasks.callback, defTasks.errback);
//Execute each task
} catch (e) {
console.log("Error caught");
console.log(e);
defTasks.errback(e);
//If you get an error for any task, execute the errback
}
}
for ( i = 0; i < tasks.length; i++) {//Use 'for' instead of 'for...in' so you can sync tasks with defTasks
try {
idParams.layerIds = identLayers;
tasks.execute(idParams, defTasks.callback, defTasks.errback);
//Execute each task
} catch (e) {
console.log("Error caught");
console.log(e);
defTasks.errback(e);
//If you get an error for any task, execute the errback
}
}
function addIdentMaps() {Thanks! Luci
//push layers to identify array
identLayers.push({
layerName : 'DEEDS'
});
identLayers.push({
layerName : 'Parcels'
});
identLayers.push({
layerName : 'ORDINANCES'
});
identLayers.push({
layerName : 'RESOLUTIONS'
});
identLayers.push({
layerName : 'EASEMENT_Disclaimer'
});
var visLayers = dojo.map(layers, function (layer) { return layer.visibleLayers; });
Is it possible for you to put all the data in your 10 mapservices into 1 mapservice?