This sample shows how to create a custom plug-in for the msdyn_GeocodeAddress and msdyn_RetrieveDistanceMatrix actions in Dynamics 365 Universal Resource Scheduling to use Google Maps API for geospatial data instead of using the default Bing Maps API.  

Prerequisites

Internet connection is required to download the sample project and to restore the NuGet packages used in the sample project.  

Requirements

C#
Edit|Remove
public const string GoogleApiKey = "<PROVIDE YOUR GOOGLE API KEY"
 

Run the sample

This sample generates a plug-in assembly file: CustomPlugin-FS-Geospatial.dll.

  1. Download and extract the .zip file.
  2. Navigate to the extracted folder, and double-click the CustomPlugin-FS-Geospatial.sln file to open the solution in Visual Studio.
  3. In Visual Studio, select Build > Build Solution. The NuGet packages used in the solution will download automatically if the option to restore NuGet packages automatically on building a project is enabled in Visual Studio. More information: Enabling and disabling package restore 

After running the sample

After you have succesfully run (build) the sample, a custom plug-in assembly file, CustomPlugin-FS-Geospatial.dll, will become available in the <Project>\bin\debug folder. You must register the sample custom plug-in assembly on your Dynamics 365 (online) instance to be able to use the plug-in to use the Google Maps API instead of the default Bing Maps API. More information:  Register and deploy your custom plug-in  

 

More Information

Create custom plug-in to use your preferred geospatial data provider