Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows phone 8.1 在Windows Phone 8.1中映射带孔的多边形_Windows Phone 8.1 - Fatal编程技术网

Windows phone 8.1 在Windows Phone 8.1中映射带孔的多边形

Windows phone 8.1 在Windows Phone 8.1中映射带孔的多边形,windows-phone-8.1,Windows Phone 8.1,我想要达到的是这样的情况: 根据本教程: 我的完整代码是: using System.Collections.Generic; using Windows.Devices.Geolocation; using Windows.UI; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Maps; using Windows.UI.Xaml.Navigation; namespace MapTest { publi

我想要达到的是这样的情况: 根据本教程: 我的完整代码是:

using System.Collections.Generic;
using Windows.Devices.Geolocation;
using Windows.UI;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Maps;
using Windows.UI.Xaml.Navigation;

namespace MapTest
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            this.NavigationCacheMode = NavigationCacheMode.Required;
        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            MapPolygon shape = new MapPolygon();
            List<BasicGeoposition> positions = new List<BasicGeoposition>();

            positions.Add(new BasicGeoposition() { Latitude = 48, Longitude = 18 });
            positions.Add(new BasicGeoposition() { Latitude = 48, Longitude = 20 });
            positions.Add(new BasicGeoposition() { Latitude = 49, Longitude = 19 });
            positions.Add(new BasicGeoposition() { Latitude = 48, Longitude = 18 });

            positions.Add(new BasicGeoposition() { Latitude = 48.25, Longitude = 18.5 });
            positions.Add(new BasicGeoposition() { Latitude = 48.75, Longitude = 19 });
            positions.Add(new BasicGeoposition() { Latitude = 48.25, Longitude = 19.5 });

            positions.Add(new BasicGeoposition() { Latitude = 48.25, Longitude = 18.5 });
            positions.Add(new BasicGeoposition() { Latitude = 48, Longitude = 18 });

            shape.Path = new Geopath(positions);
            ctrlMap.MapElements.Add(shape);
        }
    }
}
XAML文件中只有映射控件。 我尝试使用Bing SDK在Windows应用商店应用程序中使用相同的坐标,多边形显示正确。 当我尝试在Windows Phone中显示具有相同坐标的多段线时,它也会显示。 Windows Phone 8.1不支持它吗? 或者我应该使用不同的类? 当多边形显示为无效时,是否可能有一些响应


谢谢。

这是一个已知的错误,在Windows 10中也不会修复。如果您也需要此功能