none
Bing MIO Input with location address not points RRS feed

  • Question

  • Hi,

    I am using Bing MIO REST API

    https://dev.virtualearth.net/REST/V1/Routes/OptimizeItineraryAsync

    with input json post as address instead of latitude and longitude. The API is accepting input address but returning response as latitude Longitude.

    The problem is, the Input address we are supplying is not same as the returned latitude longitude.

    Please help.

    Regards,

    Abrosys

    Tuesday, February 11, 2020 11:34 AM

All replies

  • Hi Abrosys,

    Chances are the address you are giving is not formatted such that it is being interpreted correctly by the geocoder.  Take a look at the samples for waypoints in https://docs.microsoft.com/en-us/bingmaps/rest-services/routes/calculate-a-route.  there are both good and bad samples given.  Also you can try just a straight location call to see how the geocoder is converting the address you are giving.

    Sincerely,

    IoTGirl

    Tuesday, February 11, 2020 11:28 PM
    Owner
  • Thanks for your reply.

    Actually I am giving the formatted address only. (i.e. "2326 1st Ave, Seattle, WA 98121")

    But when Bing returns the response as Latitude/Longitude (i.e   <Latitude>47.613896</Latitude>
                                                                                                   <Longitude>-122.347421</Longitude>)
    Bing Geocooder with the above returned lat long.

    http://dev.virtualearth.net/REST/v1/Locations/47.613896,-122.347421?o=xml&key=key

    Geocoder is returning formatted address as "2334 1st Ave, Seattle, WA 98121"   from the above lat/Long 

    Please help.

    Regards,

    Abrosys

    Wednesday, February 12, 2020 5:03 AM
  • Hi Abrosys,

    I have reproduced your issue and logged it with the Geocoder team. They do work on an AGILE schedule so I can not give you an expected turn around time but the issue does have a link to this post so that they can update you as the issue progresses.

    Sincerely,

    IoTGirl

    Wednesday, February 12, 2020 9:29 PM
    Owner
  • Hi Abrosys,

    The Geocoder team says you are pulling the incorrect set of points from the result set. Their answer is as follows:

    In this case the user is trying to reverse geocode the address using a routing point.  The API returns both a non-routing point and a routing point for the address, but the "final result" is a routing point as it is calculating directions.  If you use the coordinates for the non-routing point lat/long, it is returned correctly.

    So in this case you should be using the co-ordinates for the display rather than the route...

    CallOutput

    Sincerely,

    IoTGirl

    Tuesday, March 24, 2020 7:23 PM
    Owner