Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

Question for applyBuffer() & getLocateGra() function on eSearch?

$
0
0
Currently when apply buffer function, I have to click the special button on graphical search view(getLocateGra function) to search a layer based on graphic from eLocate widget then click apply buffer icon(applyBuffer function) on spatial view.
Is there possible to combine two function? Therefore you only need one icon instead of two icons. I modified code below but still have to click two time on the same icon in order to apply buffer after get search layer result.
public function getLocateGra():void
{
if(locateGraphicsLayer){
var geom:Geometry
var graLayAC:ArrayCollection = locateGraphicsLayer.graphicProvider as ArrayCollection;
if (graLayAC.length > 1){
geom = unionGeoms2(locateGraphicsLayer);
queryFeaturesGraphical(geom, "esriSpatialRelIntersects", configSearchGraphical[(cboLayerGraphical.selectedIndex<0)?0:cboLayerGraphical.selectedIndex]);
applyBuffer(); // new add
}else if (graLayAC.length == 1){
geom = (graLayAC[0] as Graphic).geometry;
queryFeaturesGraphical(geom, "esriSpatialRelIntersects", configSearchGraphical[(cboLayerGraphical.selectedIndex<0)?0:cboLayerGraphical.selectedIndex]);
applyBuffer(); // new add
}else if(locateGraphicsLayer.graphicProvider.length == 0){
showStateResults();
showMessage("There are no graphics available",false);
}
}else{
showStateResults();
showMessage("There are no graphics available",false);
}
}


Thank you.

Viewing all articles
Browse latest Browse all 2097

Trending Articles