Windows 8 Metro 风格应用中 .NET GeoCoordinate.GetDistanceTo 的等价物 [英] Equivelant of .NET GeoCoordinate.GetDistanceTo in Windows 8 Metro style Apps

查看:26
本文介绍了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 的等价物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆