2

if i place the below URL in my browser http://dev.virtualearth.net/REST/v1/Locations?q=bangalore+karnataka+india&key=

The response is below

    {
authenticationResultCode: "ValidCredentials",
brandLogoUri: "http://dev.virtualearth.net/Branding/logo_powered_by.png",
copyright: "Copyright © 2014 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
resourceSets: [
{
estimatedTotal: 0,
resources: [ ]
}
],
statusCode: 200,
statusDescription: "OK",
traceId: "f54d507047604f1585db1e00254b9a7d|SINM000007|02.00.183.2300|SINMSNVM000034"
}

Not getting the resources

Any issue in the URL?

1

Do you have a Bing Maps key? See here for a reference http://msdn.microsoft.com/en-us/library/ff428642.aspx

Key's are freely available, you just need to register your application so they can track your usage, its only if your application gets a huge number of hits that you start getting charged.

Once you have a key you'll be able to structure your url correctly.

Good luck, Rowan

| improve this answer | |
  • i have the key, i think that is not an issue.. i can see the authenticationResultCode: "ValidCredentials", in response.. so its not a issue with key – chiranjeevigk Jan 13 '14 at 5:15
1

Its problem with the Query string, need to send the query with properly encoded String

| improve this answer | |
1

You need to encode and not escape your query. Instead of + signs there should be %20 for spaces. It's also a good practice to separate city/country names with a comma in a query as that's how you would normally write an address.

It is possible that valid queries will return no results if you are using a basic or trial key with Bing Maps. These keys are rate limited such that if they make a lot of calls to the service in a short period of time or the servers are under a lot of load, these requests will return empty results and the response header will have a flag to indicate the request has been rate limited. This is documented here: http://msdn.microsoft.com/en-us/library/ff701703.aspx The only way around rate limiting is to use an enterprise account.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.