ThinkGeo.com    |     Documentation    |     Premium Support

MapView is flickering when overlay is refreshed

Hey,

After there was improvements to memory consumption I encountered a few new bugs. One of them was that e.g. scale line could be duplicated multiple times if map view was resized. You can find this disccussion with @Ben here Observations about WPF beta 13

With this change came also a new annoyance. When one overlay is refreshed then whole map flickers. See GIF below. This does not happen with previous builds.

In this example the points overlay is refreshed but you can also see separate layer flickering that contains the blue line. Also the background map tiles (from your cloud service) seem to be affected,

Hope you can fix this issue. I try to create a sample project, also, to reproduce this issue.

Thanks.

Hi Mikko, A sample to recreate it will be great. If not can you share the code how those points were added and how the map was refreshed?

Sure. I think it’s related to the fact that items are added and then refreshed.
I have the bare bones project here with static features and it behaves just fine.
But I’ll get back to this on Monday. Thanks.

1 Like

While writing the sample application I managed to reproduce the issue and also go around it. Basically everything is smooth if one refresh like

if (overlay.CanRefreshRegion)
	overlay.Refresh(mapView.CurrentExtent);
else
	overlay.Refresh();

But flicker when using

mapView.Refresh()

I was quite convinced I used the former but need to check again.

I checked and triple checked that mapView.Refresh() is not called but the map still flickers in our application when bunch of points are added to the dedicated in-memory layer & overlay, with simple point style and heat mapping. There’s not even THAT many items in the feature source… still I’m not able to reproduce this easily in my sample application.

Hi Mikko,

Do you remember the former version(which has no flicker issue) you was using? If yes, could you provide the specific former version and the specific current version? We can check the changes between these 2 version and see if there’s any suspicious change.

Thanks,
Leo

1 Like

Hey @Leo_Liu

No, I can’t but I can always try to find out.

Without knowing nothing, I think this might be related to the change where you started to reuse bitmaps for performance. Just a guess… I’m still trying to find the “sweet spot” but at least when using Core beta308 and WPF beta370 there is no flickering but performance is poor compared to latest.

Ok, I hope I got it.

Core version has nothing to do with this issue as I’m using the latest in each test.

WPF beta377 works fine and does not flicker at all (see GIF below). Beta378 has some issues since it does not even show the background map. After upgrading to beta379 flickering starts occurring again.

Hi Mikko,

I compared beta 377 and beta379, there’re some changes about TileView and mapView, unfortunately I couldn’t narrow down the problem just according to code.

I also tried to create a sample, but failed to reproduce the issue. Could you take a look the sample and try to reproduce the issue with this sample?
flicker_issue.zip (31.7 KB)

Thanks,
Leo

Hey @Leo_Liu

Unfortunately I moved on to another project but I’ll inform my (ex) colleague about this thread so he can take a look at this. Thanks (again) for quick support and all the best.

Hello!

Are there some updates concerning this issue?

Thanks, @Mikko_Viitala

hi @Markus_Kemi, as my previous comment said, I cannot reproduce this issue, it’s very important for us to have a sample which reproduces the issue. Could you try to reproduce the issue with the sample I attached previously?

Thanks,
Leo

Hello @Leo_Liu

Here is a modified version of flicker_issue that reproduces the issue. The password for the download is flicker. Using heatstyles combined with multitiling is quite efficient in triggering the problem. Even though we only use singetile for overlays with heatstyles I think this project triggers the same issue we are dealing with. The issue with flickering starts with beta379 and continues in subsequent versions.

1 Like

Hi Markus,

Thanks for your sample. I can reproduce your issue now.

I’m working on it, and will let you know once I fix it.

Thanks,
Leo

2 Likes

Hi Markus,

I’ve fixed this issue. Could you upgrade ThinkGeo.UI.Wpf to 13.0.0-beta394 and give it a try? Let me know if you face any issues.

Thanks,
Leo

1 Like

Hi @Leo_Liu

Thanks for a fast response! I tried the latest update (13.0.0-beta394) and came to the following results: It fixes the issue 100% in the flicker_issue-project but it does not fully fix the issue in our production software. While it is an clear improvement it does not yet fully resolve this issue with flickering. Anyway it is a considerable improvement and I try to make still another sample project that reproduces the problems still left.

Hello!

The remaining flickering were probably caused by some VS2017 issue in debugging mode. When I start the production software without debugging the remaining flickering issue disappears. I consider this case closed. If problems appear I will return to this topic. Thank you very much!

Hi Markus,

You’re welcome. Just let us know if you face any issues. :slight_smile:

Thanks,
Leo

1 Like