我目前与Geocoder API有关。我不断收到错误消息,(401)未经授权。我正在使用分配给我的app_ID和app_Code。我已经将它们与映射功能一起使用,没有问题。
我正在尝试构建Web应用程序。我需要检索地址的地理编码坐标。我正在将地址传递给以下Geocoder API的searchtext参数:https://geocoder.api.here.com/6.2/geocode.json
using (var w = new WebClient())
{
string jsonData = string.Empty;
string url1 = "https://geocoder.api.here.com/6.2/geocode.json?app_id= <myAppID>&app_code=myAppCode>&searchtext=3003+N+Central+Ave+Phoenix+AZ+85012&gen=9";
Uri myOrigin = new Uri(url1);
string myGeocode = string.Empty;
JObject myObject = new JObject();
jsonData = w.DownloadString(myOrigin); //FAILS HERE
myObject = JObject.Parse(jsonData);
}
我期待一个json响应,其中包含纬度和经度的地理编码坐标。