Bing Maps Key not recognized in Elevation
SezMe opened this issue · comments
My Bing Maps key does not work for elevation requests but does work for other types of requests. It appears that somehow valid keys do not work for elevation requests.
Hi SezMe,
Can you please provide a set of steps someone else could take to see this issue? Is it as simple as:
- Create a project with this rest toolkit
- Try to make an elevation call like
Dim Request As ElevationRequest = New ElevationRequest With
{
.BingMapsKey = "Qs....zF",
.Height = ElevationType.Ellipsoid,
.Points = pts
}
Dim Reply As Response = Await ServiceManager.GetResponseAsync(Request)
Debug.WriteLine(Reply.AuthenticationResultCode)
Debug.WriteLine(Reply.StatusCode)
Actual Result:
Reply.AuthenticationResultCode=NoCredentials
Reply.StatusCode=401
Expected Result:
the same as https://docs.microsoft.com/en-us/bingmaps/rest-services/elevations/get-elevations
@SezMe , Thanks for your feedback. I looked into this issue, it is a bug in the way we consume the "Height" parameter. For now, a temp walk around would be leaving the Height as its default option.
Just change your code from:
Dim Request As ElevationRequest = New ElevationRequest With
{
.BingMapsKey = "someKey",
.Height = ElevationType.Ellipsoid,
.Points = coords
}
to:
Dim Request As ElevationRequest = New ElevationRequest With
{
.BingMapsKey = "someKey",
.Points = coords
}
I will work on a fix for this and will update this thread once the fix is ready.
@jiangmouren Do you have an update?
Thanks!