代码之家  ›  专栏  ›  技术社区  ›  Gala

实例化没有构造函数的类并填充get only成员

c#
  •  1
  • Gala  · 技术社区  · 9 年前

    为了显示 Geopath MapControl 在UWP上,我需要通过 到 通过一个名为 MapRoute

    我无法实例化 地图路线

    var route = new MapRoute();
    

    MapRoute' does not contain a constructor that takes 0 arguments

    我如何实例化这个类?如何填充its get -只有成员? 如果我做不到,API/Runtime是如何做到的?

    enter image description here

    1 回复  |  直到 9 年前
        1
  •  0
  •   Black Frog    9 年前

    MapRouteFinderResult 调用的方法时返回 MapRouteFinder 班

    如何根据 documentation

    MapRoute Route 的属性 班要在MapControl上显示MapRoute,请构建MapRouteView 使用MapRoute并将MapRouteView添加到 地图控件。您的通用Windows应用程序必须经过身份验证 然后才能在中使用MapControl和map服务 Windows.Services。映射命名空间。要验证你的应用,你必须