The only other edits to the HTML have been to:1. Add an "onUpdateEnd" event listener to the map that displays an alert to see if the event is being triggered (line 54); and,2. Comment out a map.setExtent call in the addShapefileToMap function (line 143). That call WAS triggering the map's "onUpdateEnd" event, but zooming in to a newly imported shapefile is not functionality I want in my application at that time.

If you load the above page and "Add File" appropriately, the features are added to the map, but the alert box does not appear. I expected to see it as the documentation for this event says "Fires after layers that are updating their content have completed." Can anyone provide information regarding why the event is not firing in this scenario? I thought it might be related to the fact that the layer in question is a feature layer, but find that if I add a FeatureService to my map instead, the event is triggered...so that's not it.

Any information in this respect is welcome. Alternatively, if there is some other way of knowing when the shapefile's addition to the map is complete, I'd be happy to learn it.

As there was no response to my query through the forums, I contacted ESRI support. They responded with the following:

The bug for this incident was created and here are the details of it.[#NIM090900 "onUpdateEnd" event on Map object fails to trigger when a layer is added from the featureCollection returned through the upload of a shapefile ]

In our particular case, we have implemented a workaround until such time as this defect is addressed. We have shifted some functionality into an "onLayerAddResult" event handler to update the legend. This is not optimal, as it means the legend gets refreshed for each layer added, rather than at the end of all layers added (whether we're importing a shapefile or not), but it does the trick for now.

As there was no response to my query through the forums, I contacted ESRI support. They responded with the following:

The bug for this incident was created and here are the details of it.[#NIM090900 "onUpdateEnd" event on Map object fails to trigger when a layer is added from the featureCollection returned through the upload of a shapefile ]

In our particular case, we have implemented a workaround until such time as this defect is addressed. We have shifted some functionality into an "onLayerAddResult" event handler to update the legend. This is not optimal, as it means the legend gets refreshed for each layer added, rather than at the end of all layers added (whether we're importing a shapefile or not), but it does the trick for now.