Newbie question: calculating distance between 2 text addresses using Bing Maps API

LMMMMM 1 Reputation point

C# .Net Core web site.

Users enter from and to address

I've looked at the documentation and it looks like the API input is in coordinates.

Do I need to find another API to convert text address to a coordinate or is there a converter API in Bing Maps?

Suggestions or alternate solutions are appreciated.

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
245 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dillon Silzer 54,281 Reputation points

    Hi @LMMMMM

    You can use the Find a Location by Query to get the longitude and latitude of two different locations:{locationQuery}?includeNeighborhood={includeNeighborhood}&maxResults={maxResults}&include={includeValue}&key={BingMapsKey}

    Then you can do simple math to get the distance between the two geocodes.

    If you want to know the distance via a driving, transit or other route option, use the Rest Route API:,WA&wp.1=Portland,OR&key={BingMapsKey}


    If this is helpful please accept answer.

    1 person found this answer helpful.
    0 comments No comments