Getting the Zip code and City when user Clicks Map

Anonymous
01-20-2005, 08:08 PM
How can I get the city and zip code of a location where the user CLICKS on the map using Map Point and VB????

Thank you!

harpanet
01-21-2005, 02:39 AM
Here is how I have done it in the past:

Implement the BeforeClick event of the Map object. The X and Y pixel location of where the user clicked is included in the parameters.

Call the XYToLocation on the map object to convert the co-ordinates into a location.

Call the FindNearby method on the location object. This will return a collection of of Location objects, one of which will likely contain the information you require.

Note that the locations returned from the call to FindNearby depend on the settings of the [map].PlaceCategories collection.

Hope this helps.

 
Web mp2kmag.com
mapforums.com