Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to get information about a geopoint using the Bing Geocode data provider

$
0
0

This example demonstrates how to obtain information about a geographical point from the Bing Geocode data provider using the BingGeocodeDataProvider.RequestLocationInformation method.

There are two ways to do this:

- specify a geographical point (GeoPoint.Longitude and GeoPoint.Latitude) in the TextBox elements. Then, click the "Request Location Information" button;

- find the coordinates of a desired geographical point yourself on the map and click the map point.

It handles the requestLocation_Click event and all parameters are passed to the RequestLocationInformation method.

Results contain a location name (LocationInformation.DisplayName), entity type (LocationInformation.EntityType), address (LocationInformation.Address) and exact coordinates (LocationInformation.Location) that are shown in the RichTextBox element.


Note that if you run this sample as is, you will get a warning message informing you that the specified Bing Maps key is invalid. To learn more about Bing Map keys, please refer to the How to: Get a Bing Maps Key tutorial.



Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>