UWP MapControl 抗锯齿在哪里 属性?

Where is UWP MapControl antialiasing property?

我使用 UWP MapControl 并添加了一些 MapPolylines。 而且它们看起来很丑(见下图)

我想应该是 antialiasing 属性 但找不到 here.

请帮忙,谢谢!

C#

var mapPolyline = new MapPolyline();
var geoPositions = new List<BasicGeoposition>();
foreach (var vertex in polyLine.Vertex)
{
  // adding BasicGeopositions...
};
mapPolyline.StrokeColor = Colors.Black;
mapPolyline.StrokeThickness = 1;
mapPolyline.Path = new Geopath(geoPositions);
((MapElementsLayer)impotMapLayer).MapElements.Add(mapPolyline);

根据答案更新 #1

我调查了这篇文章 "Overlay tiled images on a map" 并且 这个 "MapTileBitmapRequestedEventArgs Class" 无法得到 "MapTileBitmapRequestedEventArgs Class"

的 X 和 Y 的明确定义

文章说

X   Gets the X value of the requested tile.
Y   Gets the Y value of the requested tile.

使用来自 here 的 MSDN 示例,我得到以下 X、Y、Zoom

的日志
X 6073  Y 2617 Zoom 13
X 6072  Y 2616 Zoom 13
X 6071  Y 2615 Zoom 13
X 6071  Y 2617 Zoom 13
X 6072  Y 2614 Zoom 13
X 6073  Y 2615 Zoom 13
X 6071  Y 2616 Zoom 13
X 6073  Y 2614 Zoom 13
X 6072  Y 2615 Zoom 13
    
    and etc

你介意澄清一下这些数字到底是什么吗?如果我只想创建平铺图像,我如何将它与内存中的顶点地理定位集相关联,好吗? (我的折线集已经在地理点中计算出来了。)

非常感谢!

更新 #2 这是解决方案

首先我看了这篇文章https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system?redirectedfrom=MSDN

所以我们需要 TileSystem 进行一系列转换

namespace Microsoft.MapPoint 
{  
    static class TileSystem  
...

XMapTileBitmapRequestedEventArgsYTile的XY我们有传递给 TileSystem.TileXYToPixelXY(args.X, args.Y, out int pixelX, out int pixelY);

最终代码如下基于https://docs.microsoft.com/en-us/windows/uwp/maps-and-location/overlay-tiled-images

private async void customDataSource_BitmapRequestedAsync(CustomMapTileDataSource sender, MapTileBitmapRequestedEventArgs args)
{
    var deferral = args.Request.GetDeferral();
             
            
    TileSystem.TileXYToPixelXY(args.X, args.Y, out int pixelX, out int pixelY);
                    
    TileSystem.PixelXYToLatLong(pixelX, pixelY,  args.ZoomLevel, out double  lat, out double lng);
    
    Debug.WriteLine($"lat {lat}  lng {lng} Zoom {args.ZoomLevel}");
    
    // next step is to extract from my custom array polylines accroding to   TileSystem.PixelXYToLatLong

    // and finally pass it inside of CreateBitmapAsStreamAsync(array to draw);
    
    args.Request.PixelData = await CreateBitmapAsStreamAsync(array to draw);
                         
    deferral.Complete();
}

目前 MapPolylines 是在没有抗锯齿的情况下绘制的,并且没有设置来更改该行为。 查看您的屏幕截图,使用自定义图块层可能会更好。请在此处查看 CustoMapTileDatasource:https://docs.microsoft.com/en-us/windows/uwp/maps-and-location/overlay-tiled-images 您可以使用您喜欢的任何方法(包括抗锯齿)在回调中绘制每个图块。对于大量静态线(例如您示例中的地形等高线),它也会表现得更好