How to: Create a Custom Geocode Panel
To implement a custom geocode panel do the following.
- Create an InformationLayer object and add it to the MapControl.Layers collection. Assign an instance of the BingGeocodeDataProvider class to the InformationLayer.DataProvider property. Specify the BingGeocodeDataProvider.BingKey property of the provider.
- Create a custom geocode panel. In this example, this panel includes two text edits (for the Latitude and Longitude) and the Search button.
- Call the BingGeocodeDataProvider.RequestLocationInformation method. In this example, this method is called in the Search button click event handler.
NOTE
If you run the application, and see a window with the following error message: ”The specified Bing Maps key is invalid. To create a developer account, refer to http://www.