Map flickering on mouse move

1474
6
04-06-2018 08:10 AM
AlexZlotin1
New Contributor II

I am using the GeoView MouseMove event to dynamically display the coordinates at the pointer location and tooltips for a few graphics. On one machine moving the mouse causes feature labels and graphics to flicker. The client is using local data (map package) on Windows 10, and the application is built with 100.1.0 and WPF.

Is this a hardware-related issue? The machine has I3-7100 processor (3.9 GHz, 2 cores), 4 GB or RAM and Intel HD Graphics 630 graphics card. I think the problem may be with the graphics card as it has a fairly low performance rating. Thanks.

0 Kudos
6 Replies
RobertBorchert
Frequent Contributor III

Based on the title my firs thought was hardware issue.

Now that I see your computer specs I am pretty sure it is your hardware.  Most specifically the use of Intel Integrated graphics.

The low processor power and very low RAM also contribute.

0 Kudos
dotMorten_esri
Esri Frequent Contributor

Which operations on the MapView are you performing on each mouse-move?

0 Kudos
AlexZlotin1
New Contributor II

On MouseMove, I am reading off map coordinates (Web Mercator) and convert them to Lat/Long for display. I am also doing IdentifyGraphicsOverlayAsync against three graphics layers to display tooltips that contain attributes for the graphics. The combined number of graphics in all three overlays is fairly small (will rarely exceed 100) and the geometries are very simple, with a small number of vertices.

I suspect that the overlay queries and the tooltips may be the culprit, and the code can perhaps be optimized not to execute every time the mouse moves, to reduce the number of queries. Still, it does not look like the map is less responsive, it is the flickering of labels and graphics that is the problem.

 

0 Kudos
dotMorten_esri
Esri Frequent Contributor

Be careful with performing identify on mouse-move. It's a rather expensive operation. Here's a few ideas you can do to at least reduce the load (and hopefully the flicker):

  • Add a small threshold before performing an identify. Ie. don't perform one until the mouse has stopped for a brief time For instance 200ms which is still much less than you'd probably notice)
  • Don't perform identify while MapView.IsNavigating is true. This could significantly hurt rendering performance, and chances are you're not trying to hover on a moving map anyway.
  • Don't perform an identify while another one is running. Instead queue it up, and wait for the previous one to complete. Also don't queue up more than one. If multiple mouse move events occur in-between, you really only care about the latest one so you can replace the pending identify with a new one.

We do have an item on our roadmap to very efficiently perform mouse-move hit-testing on the topmost client-side rendered feature, and hopefully make it as simple as a MouseEnter/MouseLeave event, and optimized specifically for this scenario. It's a little ways down the road, but I agree this should be easier than what it currently is.

Also if you have a simple sample-app that demonstrates the flicker caused by the mouse-move/identify I'd love to take a look so we can try and address this.

0 Kudos
AlexZlotin1
New Contributor II

Thanks for the great suggestions, Morten! I have fixed this by making sure that the time delay between two consecutive overlay identify's on mouse move is at least 0.1 seconds. The flickering of the labels and graphics is no longer occurring on low-end machines.

0 Kudos
BikeshMaharjan1
New Contributor III

Hello Morten,

Same issue here: https://community.esri.com/thread/208990-calling-identifygraphicsoverlaysasync-makes-hidden-graphic-... with a sample. Not sure if you were able to reproduce it.

Thanks!

Bikesh

0 Kudos