Bing Maps API (anyone use it?)

CrazYmonkeY159

Expert Member
Joined
Sep 13, 2007
Messages
2,142
Reaction score
0
Location
CPT/PE
So something I would like to do, pretty simple, is to just do some form of single line search for locations and places of interest using Bing's Location API

Documentation is pretty simple. When I contextualize my calls with a user location using this the call just doesnt do anything I would call worthy of being used in any instance whatsoever

eg - the get request I try is
Code:
http://dev.virtualearth.net/REST/v1/Locations/V%20A%20Waterfront%20Cape%20Town?o=json&userLocation=-33.925278,18.423889&key=[MyBingMapsTrialAPIKey]

(trial key can be gotten here

anyways that call is basically searching "V A Waterfront" from a location in the city center. And the results im getting are in Langebaan. Wat?

Anybody use this API before with success? seems like using it in SA's locale is really bad. replacing my search string from "V A Waterfront Cape Town" to "KFC Cape Town" results in no results returned.

I'm asking this because apparently SA is fully supported on the API side and their Web Bing Search seems to be ok with this. What's up?
 
It's because you don't add the & in V&A, you're search for V A Waterfront. The API is much more finnicky than the site. To use an ampersand in the URL you must encode it as %26, so it will be V%26A%20Waterfront. It seems there is an issue with that with the structured URL you're using so use the unstructured format:

Code:
http://dev.virtualearth.net/REST/v1/Locations?query=V%26AWaterfront%20Cape%20Town&o=json&userLocation=-33.925278,18.423889&key=
 
I'm still not impressed with the results that I'm getting, If I search KFC I get completely laughable results

"query=KFC" returns results from Kentucky USA, even given the userLocation bias.

furthermore, "query="KFC%20Cape%20Town" returns nothing, it seems like the API does not have the same fuzzy single line search capabilities of Bing maps website.

Thank you for your help though.
 
Use Google Maps API then. They're far superior to anything Bing has to offer

Bing maps search has always been pretty bad (although recently it's got a lot better), but the actual map experience is far better and smoother than Google Maps.
 
Top
Sign up to the MyBroadband newsletter
X