Microsoft Dynamics NAV : Online Maps

Microsoft Dynamics NAV : Online Maps

  • Comments 0

Online map functionality that we've had in Dynamics NAV for some time now has changed for most of countries, after Maps were moved to Bing.

As maps were moved and collections changed, the code needs to be changed to align with this. This is scheduled for change in standard application.

Meanwhile, it is fairly simple to make some basic changes in current application code that will allow you to align existing functionality with Bing maps, for basic search functionalities in any case. Code changes are not many and are fairly simple, but stretch across several objects so I have uploaded the txt file containing these objects, for simplicity.

The changes i made here only align with new maps, functionality is more or less the same as it was, with few minor changes. Online map setup is a bit simpler, as no default links are needed nor inserted. Remember though when using this: when URL is built, it is the country/region code that will decide what language the site will open in.

Not all local sites are translated to local languages, so if one specifies NO (Norway) as a country (for example), maps will still show in English. For some countries (Germany, Spain, Italy, France,...)  selecting a country will show maps in local language. One should also keep in mind, for countries that don't have the collections in local languages - specifying country name in local language might confuse the search in some scenarios. Meaning if your user resides in Norway (example) and  customer resides in Sweden, address URL will contain country name:  Sverige (Norwegian for Sweden), and that will put the search off in some scenarios. All you need here is to either change the code so country code is not within URL (but that might give more hits to select from), or simply add a field to table 9 (Country/Regions) called ENUName. Use the data migration functionality to Import the attached XML file containing list of countries present in demo data and their ENU translations. Include only Code and ENUName fields when importing the file, and change the following line of codeunit 801 Online Map Utilities:

replace:


IF country.GET(Address[5]) THEN
  Address[5] := country.Name

with


IF country.GET(Address[5]) THEN
  Address[5] := country.ENUName

 

and your URL will always be built with country name in English, which would work for search in any language.

 

Attachment: OnlineMaps.zip
Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post