Blurry map 100.4

1301
6
Jump to solution
12-14-2018 11:27 AM
BjørnarSundsbø1
Occasional Contributor II

We have a trouble with the map being blurry in the Runtime for .NET 100.4. We did experience the same thing in 10.2.7 as well. I've attached a comparison between the MapView in 100.4 and from a WebBrowser control using the JS API.  Javascript map on the right. Issue also occurs when both maps have the same scale (seems o be a slight mismatch in this picture)

Is there anything I can do on my end to improve this?

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

One big difference between the JS API and the Runtime is that the JS API only allow you to zoom to very fixed scales that exactly matches the scale of each tile. This does have the benefit of avoiding having to stretch of squeeze the tiles, but at the same time limits you to a set of discrete scale levels. The Runtime doesn't restrict any scale, and thus tiles will often have to be slightly resampled to the current scale, and that can cause some blurriness.

The problem is much less noticeable on the newer high-dpi monitors though. If you're using WPF and you have a high-dpi monitor, make sure you opt in your app for high-dpi rendering in your, so the MapView control can take full advantage of it. This is especially a problem if you have multiple monitors and different DPI settings on each - by default WPF chooses the highest DPI of all screens to run at, but then scales it down on other monitors, which again causes blurriness (tutorial / sample here: WPF-Samples/PerMonitorDPI at master · Microsoft/WPF-Samples · GitHub ).

This is where the vector tile layers are much better to use, as they'll always render for whatever scale you're at, and render

View solution in original post

0 Kudos
6 Replies
dotMorten_esri
Esri Notable Contributor

One big difference between the JS API and the Runtime is that the JS API only allow you to zoom to very fixed scales that exactly matches the scale of each tile. This does have the benefit of avoiding having to stretch of squeeze the tiles, but at the same time limits you to a set of discrete scale levels. The Runtime doesn't restrict any scale, and thus tiles will often have to be slightly resampled to the current scale, and that can cause some blurriness.

The problem is much less noticeable on the newer high-dpi monitors though. If you're using WPF and you have a high-dpi monitor, make sure you opt in your app for high-dpi rendering in your, so the MapView control can take full advantage of it. This is especially a problem if you have multiple monitors and different DPI settings on each - by default WPF chooses the highest DPI of all screens to run at, but then scales it down on other monitors, which again causes blurriness (tutorial / sample here: WPF-Samples/PerMonitorDPI at master · Microsoft/WPF-Samples · GitHub ).

This is where the vector tile layers are much better to use, as they'll always render for whatever scale you're at, and render

0 Kudos
BjørnarSundsbø1
Occasional Contributor II

Thanks. I was suspecting something like this, but since I see the same issue at scales that match the LoDs, I wasn't sure that was the case or not.

While multiple monitors hasn't been an issue for the attached samples, I'll still look into the PerMonitorDPI, and possibly Vector tiles. Thanks

0 Kudos
BjørnarSundsbø1
Occasional Contributor II

When hosting the application on Citrix using Windows Server 2012, is there a way to support High DPI there? I've tried to research this, but the sample from microsoft Developing a Per-Monitor DPI-Aware WPF Application - Windows applications | Microsoft Docs  involves deriving from different classes etc. I've set the app.manifest based on what I see in the link you provided, but at present I have no way of truly knowing of this will make a difference to the resampling, even if the windows use different DPI.The document in your link says Windows 10 Anniversary update is required, but figuring out what is actually by Citrix and related setup is a bit much

As mentioned in the previous post, my tiled layer has LoD 625, 1250, etc, but we still get fuzzy images when at those scales.

0 Kudos
dotMorten_esri
Esri Notable Contributor

The document you refer to only adds support for multi-monitor DPIs (ie one monitor is high-res and the other isn't). If you don't do this bit, our app automatically renders in the highest DPI of all your monitors, based on what the system reports in your scale settings. I don't know what sort of dpi support Citrix provides. But if you go to the control panel under "Display -> Scale and Layout), you'll see a scaling typically somewhere between 100% and 200%. Any High-DPI monitor is usually set at something greater than 100%, and the Runtime API honors this value. (for correct scaling, the value should be somewhere around MonitorDPI / 96. Ie at 144dpi monitor would have scaling set to 150%)

0 Kudos
BjørnarSundsbø1
Occasional Contributor II

While I suspect Windows Server 2012 and high DPI might be outside of your expertize, do you have any experience on enabling per monitor there? I'm not asking for the solution, mind you; just in case you have any reference guide for this?

By the way, do you have any estimated date for the next version of the runtime? I keep checking the blog, as I'm rather excited about any new version

0 Kudos
dotMorten_esri
Esri Notable Contributor

, do you have any experience on enabling per monitor there

No. AFAIK this stuff didn't really work until Windows 10, and 2012 is based on the Win8 kernel.

do you have any estimated date for the next version of the runtime

To be honest we rarely know ourselves before a few days before (sometimes only the day before). We ship when things are ready, not based on an arbitrary cut-date. A version was shipped 3 months ago, and we have generally been shipping 2-3 releases a year, so that might give you an idea of the usual cadence. The easiest way to check for new releases is on nuget.org, as that's where they usually go live first. Blogposts sometimes goes out several days later.