Hey friends,I am working in flex 1.3 doing a web map to obtain a tooltip from a polygon when I roll my Mouse over it. However, the query that i already have is taking a lot of time, since the service has many polygons. There is a way to make a query just for the polygon doing a MouseOver, instead of the current query for all the polygons' layer?I appreciate your helpThis is my Code<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:esri="http://www.esri.com/2008/ags"
pageTitle="Nationality Representation for UNV" creationComplete="doQuery()" layout="horizontal" >
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.AsyncResponder;
import mx.events.ListEvent;
import mx.controls.Alert;
import com.esri.ags.Graphic;
import com.esri.ags.tasks.FeatureSet;
private function doQuery() : void
{
queryTask.execute(query, new AsyncResponder(onResult, onFault));
function onResult(featureSet : FeatureSet, token : Object = null) : void
{
for each(var graphic : Graphic in featureSet.features)
{
graphic.toolTip = graphic.attributes.Country + "\n" + graphic.attributes.Continent;
myGraphicsLayer.add(graphic);
}
}
function onFault(info : Object, token : Object = null) : void
{
Alert.show(info.toString());
}
}
]]>
</mx:Script>
<esri:QueryTask id="queryTask"
url="http://atlas/ArcGIS/rest/services/unv_by_country/MapServer/0" />
<esri:Query id="query" where="1=1" returnGeometry="true" outSpatialReference="{map.spatialReference}"
outFields="['Country','Continent','number']"/>
<esri:Map id="map" panStart="myGraphicsLayer.mouseChildren = false" panEnd="myGraphicsLayer.mouseChildren = true">
<esri:ArcGISTiledMapServiceLayer
url="http://atlas/ArcGIS/rest/services/unv_by_country/MapServer"/>
<esri:GraphicsLayer id="myGraphicsLayer" />
</esri:Map>
</mx:Application>