I had this same problem with a feature layer that drove me nuts. I believe in my case the jsonp callback string error (in dojo.io.script) was occurring because I tried to change both the featurelayer's visibility and layerdefinition, then change the map extent. My dev arcgis server is slow, so it takes a little time for the graphics in the featurelayer to redraw. If the layer isn't finished drawing before the map extent is changed, those errors were thrown. I solved my problem by setting the layer definition before setting its visibility and creating a small time out function to give the layer time to draw. for example- acuteLayer.setDefinitionExpression(defExp); acuteLayer.setVisibility(true); t=setTimeout(function(){updateZoomExtent(countyId, regionId)},500); I also had luck by setting the visibility of the layer to false with the event onZoomStart and then making it visible again upon onZoomEnd. //in the init function dojo.connect(map, "onZoomStart", function(extent, zoomFactor, anchor, level){ acuteLayer.setVisibility(false); }); dojo.connect(map, "onZoomStart", function(extent, zoomFactor, anchor, level){ acuteLayer.setVisibility(true); }); I'll probably end up using the second method which so far works the best for my map.
... View more