MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




I was wondering if there was any direct method to ....

This is a discussion on I was wondering if there was any direct method to .... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I was wondering if there was any direct method to do reverse geocoding. I have a lat/long and need to ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-13-2001
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
I was wondering if there was any direct method to do reverse geocoding. I have a lat/long and need to get a block address from it, but i haven't been able to find a clear way of doing this. Is there any code out there to show me what I need to do?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-13-2001
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
The snippet below (meant to be used with MapPoint 2002) demonstrates a way
how it can done.
It creates a location using given lat and lon, and uses the
ObjectsFromPoint method of the map object to retrieve a FindResults
collection. It then outputs the name of the first (and usually best) hit:

<form><textarea wrap="off" readonly="true" name="code"
style="BORDER-BOTTOM:
gray 1px inset; BORDER-LEFT: gray 1px inset; BORDER-RIGHT: gray 1px inset;
BORDER-TOP: gray 1px inset; OVERFLOW: auto; WIDTH: 100%" rows="26"
cols="40">
Option Explicit

Dim oMpApp As MapPoint.Application

Private Sub Command1_Click()
' Attach to running instance of MapPoint
Set oMpApp = GetObject(, "MapPoint.Application")

' Retrieve the active map
Dim oMap As MapPoint.Map
Set oMap = oMpApp.ActiveMap

Dim oLoc As MapPoint.Location
Set oLoc = oMap.GetLocation(40.778, -124.1827, 1)
oLoc.GoTo
' Altitude of 1 and Goto important - better
' results from ObjectsFromPoint

Dim Rs As MapPoint.FindResults

Set Rs = oMap.ObjectsFromPoint( _
oMap.LocationToX(oLoc), _
oMap.LocationToY(oLoc))
MsgBox Rs.Item(1).Name
End Sub
</textarea></form>

More details and another sample can be found in the documentation of the
FindResults object - you'll probably want to check results quality,
retrieve alternative hits , and retrieve additional info about the found
locations. Note that this is not guaranteed to get you a street address.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
direct, method, wondering


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Direct Mailing Adresses Anonymous MapPoint 2006/2009 Discussion 1 05-28-2003 02:45 PM
Is it possible to get a direct HANDLE to the Map? .... Anonymous MapPoint 2006/2009 Discussion 2 06-19-2002 10:05 AM
I am wondering if anyone has built a COM add-in ap.... Anonymous MapPoint 2006/2009 Discussion 1 05-13-2002 09:55 AM
Hello, I'm wondering if there is a way to include.... Anonymous MapPoint 2006/2009 Discussion 1 09-04-2001 12:52 PM
My company was wondering what is the accuracy of y.... Anonymous MapPoint 2006/2009 Discussion 1 05-11-2001 01:30 PM


All times are GMT -5. The time now is 03:40 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54