Share via


LineDrive Map Sample

LineDrive Map Sample

This sample ASP.NET application demonstrates how to draw LineDrive maps and directions. There are two Web pages included in this sample application: MapAndDirections.aspx shows how to generate a series of LineDrive maps for a complex set of directions. MapCompare.aspx allows you to compare a traditional route map to a LineDrive map.

To run this sample in Microsoft® Visual Studio® .NET, your Visual Studio .NET installation must be set up to run and debug ASP.NET applications and Internet Information Services (IIS) must be running. For more information about for information on installing IIS and setting up Visual Studio .NET, see the Visual Studio .NET product documentation.

Running the sample

Note To run the Visual Basic® .NET version of this sample, replace cs with vb in the following procedure.

  1. In the IIS virtual root directory, create a new folder called LineDriveCS. The default path to the virtual root is C:\Inetpub\Wwwroot\.

  2. Copy the files in the SDK_Install_Folder\Samples\[.NET 1.1 | .NET 2.0]\LineDrive\Cs directory to the LineDriveCS folder.

  3. Double click SDK_Install_Folder\Samples\[.NET 1.1 | .NET 2.0]\LineDrive\cs\LineDriveCS.csproj file to open the project.

  4. Right-click the MapPoint Web reference and then choose Update Web Reference.

  5. In the Solution Explorer, double-click the Web.config file to open it, and then set the values of the user and password keys to your customer ID and password, respectively.

  6. On the File menu, click Save to save the Web.config file.

  7. Right-click eitherMapCompare.aspx or MapAndDirections.aspx, and then click Set as Start Page.

  8. On the Debug menu, click Start.