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 的等价物


基础教程推荐
- 全局 ASAX - 获取服务器名称 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01