Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on street address from lat/lon... VB style within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Like an earlier post, I need to derive the street address from the Lat/Lon coordinates on a map. However, I ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| street address from lat/lon... VB style MapPoint has this neat feature where you can click on a street and the street address will just pop right up. Is there no means for just programmatically utilizing this function with the MapPoint VB control? I've worn out my eyes and fingers looking for a way to do this. Since the functionality is there within MapPoint, it seems like it ought to be available. Any help will be greatly appreciated. |
| |||
|
I know this answer is out there, because I found it once and use it quite a bit. I wrote code that automatically displays the current address in a label as you move the mouse over the map. Don't have time to get to it today, but if you don't get an answer, email me at chet@chetcromer.com and I'll help you out. Chet |
| |||
|
here is some code i use in vb5/6. as the mouse is moved around the map the Lat (lblLat), Lon (lblLon) and address (lblWhere) are displayed Private Sub ctlMap_MouseMove(ByVal button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long) Dim objMouseLoc As mappoint.Location Dim objMouseResults As mappoint.FindResults Dim latlon As LatLonType Dim index As Integer Set objMouseLoc = objCallMap.XYToLocation(X, Y) If Not objMouseLoc Is Nothing Then latlon = calcpos(objCallMap, objMouseLoc) lblLat.caption = Format(latlon.Lat) lblLon.caption = Format(latlon.Lon) Set objMouseLoc = Nothing Set objMouseResults = objCallMap.ObjectsFromPoint(X, Y) lblWhere = "" If objMouseResults.count > 0 Then If Not (objMouseResults.item(1).Location.StreetAddress) Is Nothing Then lblWhere = "Mouse is at: " & objMouseResults.item(1).Location.StreetAddress.Str eet Else lblWhere = "" End If Else lblWhere(1) = "" End If Set objMouseResults = Nothing End If Exit Sub My 'Calcpos' routine is based on the Calcpos routine found in the articles section of this site. It returns LatLon from a mappoint location. I modified it to use a typed variable LatLon Public Type LatLonType Lat As Double Lon As Double H As Double End Type |
![]() |
| Tags |
| address, lat or lon, street, style |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mapping Southern Ireland Street Address | Yazzy | MapPoint 2006/2009 Discussion | 5 | 01-15-2006 03:02 PM |
| Has anyone got street address with MapPoint Euro 2004? | Anonymous | MapPoint 2006/2009 Discussion | 8 | 02-09-2005 08:13 AM |
| Getting 'second' street address | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-06-2004 09:31 AM |
| GeoRoadType from Street Address | Anonymous | MapPoint 2006/2009 Discussion | 0 | 01-25-2004 05:22 AM |
| street address limit | bob | MapPoint 2006/2009 Discussion | 5 | 11-04-2003 07:51 AM |
Tenerife Holiday
Find a great deal on a Tenerife holiday through UlookUbook! Check out the options online...