【问题标题】:Nuget Package for interacting with Google Maps用于与谷歌地图交互的 Nuget 包
【发布时间】:2015-03-29 13:24:10
【问题描述】:

我有一个 C# 控制台应用程序,我想用它来与 Google 地图 API 交互。但是,我不确定要使用哪个 Nuget 包。我有一个城市名称列表,我想知道每个城市之间的距离。换句话说,假设我有以下列表:

Portland, OR
Las Vegas, NV
San Diego, CA

最终,我希望能够生成一个看起来像这样的矩阵。

+----------------+--------------+---------------+---------------+
|                | Portland, OR | Las Vegas, NV | San Diego, CA |
+----------------+--------------+---------------+---------------+
| Portland, OR   | 0 mi.        | 978 mi.       | 1,083 mi.     |
+----------------+--------------+---------------+---------------+
| Las Vegas, NV  | 978 mi.      | 0 mi.         | 331 mi.       |
+----------------+--------------|---------------+---------------+
| San Diego, CA  | 1,083 mi.    | 331 mi.       | 0 mi.         |
+----------------+--------------+---------------+---------------+

因此,我只需要弄清楚哪个 Nuget 包可以让我查询 Google Maps API 并获取两点之间的距离。但是,即使在searching the packages 之后,我也无法确定该使用哪一个。谁能告诉我哪一个是最好的选择?

【问题讨论】:

    标签: c# .net google-maps console-application


    【解决方案1】:

    可能是 gmaps-api-net - https://www.nuget.org/packages/gmaps-api-net/

    项目网址:https://github.com/ericnewton76/gmaps-api-net

    您必须使用的实际 api 是 Direction Matrix,并记录在这里:https://developers.google.com/maps/documentation/distancematrix/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-13
      相关资源
      最近更新 更多