【问题标题】:Create Lat+Long from a string?从字符串创建 Lat+Long?
【发布时间】:2011-10-26 16:07:57
【问题描述】:

在 Windows Phone (mango) 中,我使用的是 Microsoft.Phone.Controls.Maps。

我目前有:

var _City = "Denver";
var _State = "Colorado";

我想要一个图钉:

var _Pushpin = new Pushpin();
_Pushpin.Location = new GeoCoordinate();
map1.Children.Add(_Pushpin);
map1.Center = _Pushpin.Location;

如何仅从字符串创建正确的地理坐标?

使用解决方案更新(使用 Bing): http://blog.jerrynixon.com/2011/10/bing-maps-geocoding.html

【问题讨论】:

    标签: c# bing-maps windows-phone-7.1 geocode


    【解决方案1】:

    有几种方法...

    1) 获取 Bing Maps API 密钥并调用其网络服务以获取坐标。 (see here for an example)
    2)有一个城市/州/坐标的本地数据库来查找。如果应用程序必须离线运行,这可能是首选选项,尽管在这种情况下您无论如何都看不到地图。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多