This project has moved and is read-only. For the latest updates, please go here.

Fill Disappearing on Zoom

Mar 26, 2013 at 12:00 PM

So we are finally drawing lines and polygons on the map at will! Whoop Whoop, but we have the weirdest issue, when we zoom out to a maximum we loose the fill on certain shapes?

Does anyone else have the same issues?
Dec 28, 2014 at 2:48 PM
I have the same issue
Aug 11, 2015 at 3:43 PM
I also have this issue. @ClemensF, have you seen this issue before? Is there something that can be done to fix it?
Aug 11, 2015 at 4:36 PM
I guess all of you are encountering this in Windows Runtime (although nobody has told anything about their platform).

I don't yet see anything that could be done in the Map Control code to avoid this behavior. It's just that Windows Runtime has problems with UI elements that are scaled to very large sizes. Lines get blurry, fills are entirely lost. No idea if Microsoft will ever fix this.
Aug 12, 2015 at 3:50 PM
Edited Aug 12, 2015 at 3:52 PM
I think they won't fix this because its seems that this is a "trick" to improve performance when rendering large vector based graphics. In the msdn forum a MSFT member posted a answer mentioning this performance considerations:

I'm trying to implement a zoom mechanism used in this control :
But to be honest it's kind of hard to integrate it into the map control.
Aug 12, 2015 at 4:05 PM
Apologies. ClemensF, I am facing this problem on WPF, using the .NET Framework version 4.5

My current solution is to use my own visuals, which through a binding to the Map's ZoomLevel property, I constantly re-draw the visual according to the latest values in the relevant scale.
Aug 12, 2015 at 4:46 PM
Sven, thanks for sharing the link. It really sounds like they are expecting us to live with this limitation. Working around it would indeed be difficult in the map control library, but I will think about it. However, I assume that it is generally easier done in the application by redrawing the relevant visible parts of the shapes.

Piso, I've never observed this in WPF, so no idea where to look at.
Aug 24, 2015 at 2:56 PM
Maybe this limitation only affects XAML Shapes. In this case we could use DirectX to draw shapes. According to this blog post it is possible to mix DirectX and Xaml in a normal XAML Application:

Especially the "SurfaceImageSource" thing sounds interesting. The only drawback is that you have to code it with managed C++ :S (or maybe C# with SharpDX: