Community of VE/MapPoint Users and Developers
This is a discussion on Capture the Pushpin move event within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I linked a DB (using a UDL) to a dataset. But I need to change the Lat,lon data on ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Capture the Pushpin move event
Maybe. Depends on how you want it to work. You could try using the mouse events. Somehting like the following untested code: Dim WithEvents mpObj As New MapPoint.Map Dim objLoc As MapPoint.Location Dim objPin As MapPoint.Pushpin Private Sub mpObj_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long) If TypeOf mpObj.Selection Is MapPoint.Pushpin Then Set objPin = mpObj.Selection Set objLoc = objPin.Location Else Set objPin = Nothing Set objLoc = Nothing End If End Sub Private Sub mpObj_MouseUp(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long) If objPin Is mpObj.Selection Then ' It's the same pushpin If 0 <> objPin.Location.DistanceTo(objLoc) Then 'It's moved do something End If End If Set objPin = Nothing Set objLoc = Nothing End Sub Note the location object don't have identiy, but pushpin objects do. A location is really just an object that represents a number (e.g. Lat/Long). A pushpin is an actual object on a map, so "objPin is mpObj.Selection" works while "objPin.Location is objLoc" does not. |
![]() |
| Tags |
| capture, event, move, pushpin |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pushpin move on map and new locaiton | Anonymous | MapPoint 2006/2009 Discussion | 2 | 01-28-2005 03:26 PM |
| find city name & state name on mouse move event | Atul22 | MapPoint 2006/2009 Discussion | 2 | 10-15-2004 05:28 AM |
| Capture mappoints close event | Dazzer | MapPoint 2006/2009 Discussion | 0 | 06-29-2004 06:19 AM |
| Help.! How to move a pushpin in the map. | Anonymous | MapPoint 2006/2009 Discussion | 9 | 03-10-2003 06:00 PM |
| It is possible to drag / drop (move) an PushPin on.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 12-03-2001 03:54 AM |