Equivelant of .NET GeoCoordinate.GetDistanceTo in Windows 8 Metro style Apps(Windows 8 Metro 风格应用中 .NET GeoCoordinate.GetDistanceTo 的等价物)
问题描述
Metro 风格的 Windows 8 应用程序中 System.Device.Location.GeoCoordinate.GetDistanceTo 方法的等价物是什么.
What is the equivelant of the System.Device.Location.GeoCoordinate.GetDistanceTo method in Metro style Windows 8 Applications.
Metro 应用程序具有 Geocoordinate 类(带有小写C"),但没有 GetDistanceTo 方法.
Metro applications have the Geocoordinate class (With a lower case 'C') but no GetDistanceTo method.
其次,Metro Geocoordinate 类没有构造函数.如何创建它的实例.
Secondly, the Metro Geocoordinate class has no constructor. How can I create an instance of it.
推荐答案
Metro Geocoordinate 由于某种原因没有 public 构造函数.在我看来,实现这一点的最佳方法是使用 Reflector 并复制 System.Device.Location.GeoCoordinate 的实现,这也会为您提供 GetDistanceTo.
The Metro Geocoordinate has no public constructor for some reason. The best way to implement this in my opinion is to use Reflector and copy the implementation of System.Device.Location.GeoCoordinate which will also give you GetDistanceTo.
希望这会在以后重新添加到 API 中.
Hopefully this will be re-added to the API at a later time.
这篇关于Windows 8 Metro 风格应用中 .NET GeoCoordinate.GetDistanceTo 的等价物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Windows 8 Metro 风格应用中 .NET GeoCoordinate.GetDistanceTo 的等价物
基础教程推荐
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 从 C# 控制相机设备 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 将数据集转换为列表 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 如果条件可以为空 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
