Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on Getting Lat/Lon from a given address within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I use this routine in my application: Private Sub Befehl0_Click() Dim objApp As New MapPoint.Application Dim objFindResults As MapPoint.FindResults objApp.Visible ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Getting Lat/Lon from a given address Private Sub Befehl0_Click() Dim objApp As New MapPoint.Application Dim objFindResults As MapPoint.FindResults objApp.Visible = False objApp.UserControl = True 'Erstes Ergebnis der Suche ausgeben Set objFindResults = objApp.ActiveMap.FindAddressResults("Römerstraße 12", "Düren", , , "52349", geoCountryGermany) MsgBox "Das erste Element in der Ergebnisliste lautet: " _ + objFindResults.Item(1).Name objApp.Application.Quit End Sub But instead of the name of I would like to get back Lat/Lon. Is this possible? Ralf |
| |||
|
Sorry but can you help me again? I´m not able to call the function CalcPos. Here is my routine: Private Sub Befehl0_Click() Dim MPApp As New MapPoint.Application MPApp.Visible = True MPApp.UserControl = True Dim oMap As MapPoint.MAP, oLoc As Object, Strasse As String, Plz As String, stadt As String Dim oPin As MapPoint.Pushpin Dim objResults As MapPoint.FindResults Dim strRevAddress As String Dim lat As Double, lon As Double Set oMap = GetObject(, "MapPoint.Application").ActiveMap Strasse = "Römerstraße 12" Plz = "52351" Ort = "Düren" Set oLoc = oMap.FindAddressResults(Strasse, Ort, , , Plz, geoCountryGermany) Call CalcPos(oMap, oLoc.Location, lat, lon) MsgBox oLoc.Item(1).Name & lat & " " & lon End Sub I allways get an error. |
| |||
|
For the second argument of calcpos try using a mappoint.location object. Define for instance the following dim oLoc as mappoint.location then do everything else the same and in the calcpos call just use oLoc instead of oLoc.location hope this works |
![]() |
| Tags |
| address, lat or lon |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| odd and even address | chris2 | MapPoint 2006/2009 Discussion | 1 | 05-24-2006 11:07 AM |
| Anyone willing to look up an address for me? | Anonymous | MapPoint 2006/2009 Discussion | 11 | 02-07-2004 07:09 PM |
Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!