Ah - Robert! Seeing your name jingled something loose in my head. My error may be larger than this code to pass parameters in the RUL. A few months ago I had downloaded and modified your SalesWidget (found here in this thread), and remembered I also received the exact same error. After a quick search for a solution, I just gave up. Here's the code I'm using to modify the URL query string in the mapLoadComplete function in MapManager.mxmlImport declarations:import com.esri.ags.FeatureSet;import com.esri.ags.geometry.Polygon;import com.esri.ags.layers.GraphicsLayer;import com.esri.ags.tasks.QueryTask;import com.esri.ags.tasks.supportClasses.Query;import mx.rpc.AsyncResponder;
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.LAYER_LOADED));
var urlSubstring:String = ExternalInterface.call("window.location.search.substring", 1);
if (urlSubstring != ""){ // Parse URL
var totalLength:Number = urlSubstring.length;
var i:int = 0;
var firstLetter:String = urlSubstring.charAt(i);
var firstEqualsSignLocation:Number = urlSubstring.indexOf('=');
var firstStarLocation:Number = urlSubstring.indexOf('*');
var firstExclamtionLocation:Number = urlSubstring.indexOf('!');
if (firstLetter == "q"){ // Parcel Query
var label:String = "Processing query... please wait."
var queryTask:QueryTask = new QueryTask();
var qGlyr:GraphicsLayer = new GraphicsLayer();
map.addLayer(qGlyr);
var graphicLineSym:SimpleLineSymbol = new SimpleLineSymbol("solid", 0xFFFF00, 0.8, 2); // Yellow outline
var graphicPolySym:SimpleFillSymbol = new SimpleFillSymbol("solid", 0xFF0000, 0.5, graphicLineSym); // Red fill
var qValue:String = urlSubstring.substring( (firstEqualsSignLocation + 1),firstExclamtionLocation);
var qValueLyr:String = urlSubstring.substring( (firstExclamtionLocation + 1),firstStarLocation);
var vValue:String = urlSubstring.substring( (firstStarLocation + 3),totalLength);
var qFCPre:String = "<theservername>/arcgis/rest/services/";
var qFCSuf:String = "/MapServer/";
var queryLayer:String = qFCPre + qValue + qFCSuf + qValueLyr;
var query:Query = new Query();
query.returnGeometry = true;
query.text = vValue;
queryTask.url = queryLayer;
queryTask.execute(query, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):void {
qGlyr.clear(); // clear the graphics layer
if (featureSet.features.length == 0) {
Alert.show("No Parcels matched. Please try again.");
}
else {
var unionExtent:Extent;
var myFirstGraphic:Graphic = featureSet.features[0];
unionExtent = Polygon(myFirstGraphic.geometry).extent;
for each (var myGraphic1:Graphic in featureSet.features){
myGraphic1.symbol = graphicPolySym;
qGlyr.add(myGraphic1);
unionExtent = unionExtent.union(Polygon(myGraphic1.geometry).extent);
}
map.extent = unionExtent; // Zoom to queried polygon
}
}
function onFault(info:Object, token:Object = null):void {
Alert.show(info.toString());
}
}
} // LCRA - URL Modification ends here
Anyway - again any insight is much appreciated!AmberJackson Co, Missouri