Routes using the street name only RRS feed

  • Question

  • Hello,

    I´m using Json to receive a route. But I cant´t get results using only the street name, I have to write the city name, how can I set a default location for my app?

    Uri routeRequest = new Uri(string.Format("http://dev.virtualearth.net/REST/V1/Routes/Driving?wp.0={0}&wp.1={1}&rpo=Points&c=pt&key={2}", from, to, PoaMap.Credentials));

    Friday, May 30, 2014 5:10 AM


All replies

  • You have to provide more than just a street name. If you want to specify a default city you can append it to the from and to values like this ", city name". Also, encode your parameters to ensure that special characters do not break the url. Take a look at these tips http://www.bing.com/blogs/site_blogs/b/maps/archive/2013/02/14/bing-maps-rest-service-tips-amp-tricks.aspx


    Friday, May 30, 2014 2:02 PM
  • Thanks for answering Ricky.

    I got this error from the store:

    Missing data area(s):
    This is one example of missing or incomplete functionality (they try to get a route using only the street name). Please inspect your App and address any other instances before resubmitting.
    Some form data may not be necessary and therefore left intentionally blank.

    I could concatenate the city name but if someone decided to write the city name it returns an error.

    Thank you,


    Friday, May 30, 2014 5:41 PM
  • Never seen that message before? Is that from the Windows Store app submission process? Unless your app says to enter just a street there should be no issue from the submission process end of things. If your app says to enter a street address then that would mean the user is meant to enter in a full address that goes to street level. I very rarely come across any apps that ask for just a street and not a street address, and in those cases the app is limited to a single city (think city council type app).


    Saturday, May 31, 2014 6:12 AM
  • Yes, it was from the Windows Store app submission. It is actually an application of a single city, but it is possible that the route is requested to a nearby town. I will try to put some autosuggest option.


    Monday, June 2, 2014 3:39 AM
  • Take a look at this blog post for an interesting approach to auto complete http://blogs.msdn.com/b/bingdevcenter/archive/2014/03/31/customer-ranked-auto-suggest-with-bing-maps-and-azure-mobile-services.aspx


    Monday, June 2, 2014 7:29 AM