function onResult(featureSet:FeatureSet, token:Object = null):void { try{ for each (var myGraphic:Graphic in featureSet.features) { //do something with the features returned var mp:MapPoint=featureSet.features[0].geometry as MapPoint; arrPoints.addItem(mp); } var polyLine:Polyline= new Polyline(); polyLine.addPath(arrPoints); //add points to polyline var g:Graphic = new Graphic(polyLine); //create new graphic to add to graphicsLayer //symbol for line graphicsLayer.symbol = new SimpleLineSymbol("solid",0xFF3333,1,3); //add to graphicsLayer graphicsLayer.add(g); }catch(err:Error){ Alert.show("no pasa"); } }
Solved! Go to Solution.
function onResult(featureSet:FeatureSet, token:Object = null):void
{
try{
for each (var myGraphic:Graphic in featureSet.features)
{
myGraphic.symbol=slsFind;
graphicsLayer.add(myGraphic);
acPolyline.addItem(graphicsLayer);
}
}catch(err:Error){
Alert.show("no");
}
}
function onResult(featureSet:FeatureSet, token:Object = null):void
{
try{
for each (var myGraphic:Graphic in featureSet.features)
{
myGraphic.symbol=slsFind;
graphicsLayer.add(myGraphic);
acPolyline.addItem(graphicsLayer);
}
}catch(err:Error){
Alert.show("no");
}
}