Share via


Drag Pushpin on Map Sample

Drag Pushpin on Map Sample

This sample Microsoft® Windows® application allows the end-user to place and relocate pushpins by dragging them and dropping them onto a map. The sample application uses the RenderServiceSoap.ConvertToLatLong method to get the location and FindServiceSoap.GetLocationInfo method to get address information for the pushpin. This information is displayed in a grid next to the map.

Run this sample in Visual Studio .NET

  1. Double-click the project file to open the project in Microsoft® Visual Studio® .NET.

    Visual Basic .NET project location:

    SDK_Install_Folder\Samples\[.NET 1.1 | .NET 2.0]\DragPushpinOnMap\vb\DragPushpinOnMap.vbproj

    Visual C# .NET project location:

    SDK_Install_Folder\Samples\[.NET 1.1 | .NET 2.0]\DragPushpinOnMap\cs\DragPushpinOnMapCS.csproj

  2. In the Solution Explorer window, double-click app.config to open the file.

  3. Replace the values of the MPUser and MPPass keys with your customer ID and password.

  4. In the Solution Explorer window, expand the Web References folder, right-click MapPointService, and then click Update Web Reference.

  5. On the Debug menu, click Start.