MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Capture the Pushpin move event

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 ...


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 03-04-2003
Junior Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 12
Send a message via MSN to Maverick
Capture the Pushpin move event

Hi,
I linked a DB (using a UDL) to a dataset.
But I need to change the Lat,lon data on my database when the user move the pushpin.
Is this possible?
Thanks in advance!
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 04-14-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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.
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
capture, event, move, pushpin


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
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


All times are GMT -5. The time now is 10:09 AM.


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