Is it possible for you to put all the data in your 10 mapservices into 1 mapservice?
var visLayers = dojo.map(layers, function (layer) { return layer.visibleLayers; });
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() { //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' });
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 } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.