0

In standard AX2012, there is a method called "mapIt" in smmUtility class which opens a browser and shows the location of the address you've typed.

As described in the title section, how do I get the total distance from A to C via B using Bing maps with a call from Dynamics AX2012 x++ code?

Do I have to create a service in Visual Studio in C#, add this service to dynamics and call this service from x++?

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
Phu Minh Pham
  • 1,025
  • 7
  • 21
  • 38

2 Answers2

1

If you need the great cirle distance and you know the coordinates there is no need for Bing.

http://www.ga.gov.au/earth-monitoring/geodesy/geodetic-techniques/distance-calculation-algorithms.html

If using Bing you have to create a service in Visual Studio in C#, add this service to dynamics and call the service from X++ as explained in the walkthrough.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
  • I have to use Bing because we have someone that demands it. So I can't write some X++ code without using a service created from Visual Studio? – Phu Minh Pham Feb 26 '14 at 07:52
  • No you cannot, as stated. The "demand" I guess, is because you need road distances, not great circle distances. – Jan B. Kjeldsen Feb 26 '14 at 08:07
  • That is correct, I need road distance from one address to another address and sometimes via some other addresses. I'll start by making a service and call it from within AX. – Phu Minh Pham Feb 26 '14 at 09:19
0

There is nothing built in. You would have to use the Bing Maps REST services to calculate a route from A to C via B. You can find documentation on the Bing Maps REST services here: http://msdn.microsoft.com/en-us/library/ff701713.aspx

Note that in order to use the Bing Maps REST services you will need a Bing Maps account and key:

http://msdn.microsoft.com/en-us/library/gg650598.aspx

http://msdn.microsoft.com/en-us/library/ff428642.aspx

Also, since this is likely an internal application you will also need a Bing Maps license.

rbrundritt
  • 16,570
  • 2
  • 21
  • 46