Reputation: 13
I keep having this error when using Bing Maps API, as anyone encountered this issue?
Upvotes: 0
Views: 841
Reputation: 13
I resolved the issue. I kept getting the authentication issues because there was a "#" in the address line. If an apt or street number is written as #.., it will keep asking for credentials. Just change the # to No and it works fine.
Upvotes: 1
Reputation: 442
I have. What have you done exactly? Why is it complaining about credentials?
Here is an example function I used at the time. It fetches the Coordinates for a desired city. You can paste it in Advanced Editor and make a function. Just make sure to insert your api key.
let
fxGetCoords = (city as text) =>
let
Source = Json.Document(
Web.Contents("http://dev.virtualearth.net/REST/v1/Locations?query=" &
city & "&includeNeighborhood=0&key="xxxxxx-insert-your-key-here-
xxxxxxxx")
),
resourceSets = Source[resourceSets],
resourceSets1 = resourceSets{0},
resources = resourceSets1[resources],
resources1 = resources{0},
point = resources1[point],
coordinates = point[coordinates],
#"Converted to Table" = Table.FromList(coordinates, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Renamed Columns" = Table.RenameColumns(#"Transposed Table",{{"Column1", "Latitude"}, {"Column2", "Longitude"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Latitude", type number}, {"Longitude", type number}})
in
#"Changed Type"
in fxGetCoords
If this works the problem is not your credentials, but how you are using them.
Upvotes: 0