I am trying to show a selected feature information in a popup using ShowCalloutAt API function on mousemove event. using below code:
public class TestMouseMove
{
public TestMouseMove(MapView mapView)
{
mapView.MouseMove+=MouseMove_Event;
}
private void MouseMove_Event(object sender, MouseEventArgs e)
{
var screenPoint = new MapPoint (e.Location.X, e.Location.Y,
EsriMapView.SpatialReference);
var mapPoint = (MapPoint)GeometryEngine.Project (screenPoint, SpatialReferences.Wgs84);
Feature selectedFeature=null;
//I have written logic to Filter and take the single feature of top layer under mouse pointer
selectedFeature=GetFeatureUnderMousePointer();
//Now I am calling callout at the selected point using below code
CalloutDefinition myCalloutDefinition = new CalloutDefinition("Testing message");
// Display the callout
MyMapView.ShowCalloutAt(mapPoint , myCalloutDefinition);
}
private GetFeatureUnderMousePointer()
{
//Logic to filter and ge feature under mouse pointer
}
}
But, if I move my mouse pointer within polygon feature, the ShowCAllout popup up is appears many time on mousemove. As a result the popup appears like it blinks. So, is there is any better way to implement with something like on mousemovestop event?.
Or any suggestion on solving this problem is appreciated.
Thanks in advance.