Compartilhar via


Reverse Geocoding over a Search Area

Some times it may be useful to reverse Geocode multiple coordinates in a specific area in order to generate a list of nearby addresses. To do this I expanded upon the code in the article Simple Reverse Geocode with Mouse click.

The following will be need to be done:

1) Retrieve the coordinate where the user clicked.
2) Calculate the corners of our search area using destination coordinate formulas (https://rbrundritt.spaces.live.com/blog/cns!E7DBA9A4BFD458C5!400.entry).
3) Draw a polygon box to show search area.
4) Calculate the top left corner of the search are and us this to calculate all coordinates that make up an evenly spaced out mesh of our search area.
5) Make multiple calls to the Reverse Geocoding service and create a list of locations that get returned, remove duplicates.
6) Display list of found locations.

Complete source code can be found here: https://cid-e7dba9a4bfd458c5.skydrive.live.com/self.aspx/VE%20Sample%20code/BingMapsReverseGeocodeArea.zip

Here is a screen shot of the application:

reverseGeo

Comments