MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MappointControl and Pushpin

This is a discussion on MappointControl and Pushpin within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am building a standalone (not addin) VB6 App based around the MappointControl. Does anyone know if it is possible ...


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 06-30-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
MappointControl and Pushpin

I am building a standalone (not addin) VB6 App based around the MappointControl. Does anyone know if it is possible to use the MapPointControl to select a point on the map and progmaticly with the mouse and add a pushpin from the location of the mouse click on the map?

I expect it is somehow possible using one of the events avaliable to the MapPoint control such as :

AfterRedraw
AfterViewChange
BeforeClick
BeforeDblClick
DataMapChange
MouseDown
MouseMove
MouseUp
NewDataSet
ReadyStateChange
RouteAfterCalculate
RouteAfterOptimize
SelectionChange

however I have not been able to dynamicaly obtain a address upon catch of lets say a MouseDown event, geocode it and convert it progmaticly to add the pushpoint.

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 07-01-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Here's what I'm thinking use the MouseDown event and

objMap.XYToLocation(MouseX, MouseY)
'where MouseX and Y refer to the Mouse location on the screen

Then assign the location returned by this to a new pushpin
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 07-02-2004
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 37
I tried out this code, it adds a pushpin to the map (objMap) when you click the left and right mouse buttons together (all you have to do is change the Button value to switch)

Code:
  Private Sub objMap_BeforeClick(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)
    If Button = 3 Then
       Dim pinLoc As Mappoint.Location
       Set pinLoc = objMap.XYToLocation(X, Y)
       objMap.AddPushpin pinLoc, "great"
       pinLoc.goto
    End If
  End Sub
Hope this helps you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 07-02-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Outstanding! Thank you very much!!! I appreciat very much!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 07-06-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
This works great except when I click on a geocodable location, at that point Mappoint default behavior pops up a listbox with addresses in it. I'd like to retrieve the address chosen from the list box and then place the pushpin. This would solve the problem. Any sugestions? To reproduce what I am talking about just zoom in close enough so you can percisly click on a road.

Thanks!
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
mappointcontrol, 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
Mappointcontrol on IPAQ PDA Anonymous MapPoint 2006/2009 Discussion 3 01-28-2006 10:50 AM
MapPointControl Windowless / VB6 Guido Mitschke MapPoint 2006/2009 Discussion 3 12-29-2005 01:13 PM
[C#] MappointControl - Pushpin symbol suamikim MapPoint 2006/2009 Discussion 4 11-23-2005 02:02 AM
MapPointControl.ocx Anonymous MapPoint 2006/2009 Discussion 1 03-25-2005 09:46 AM
download mappointcontrol Anonymous MapPoint 2006/2009 Discussion 1 12-10-2004 05:14 AM


All times are GMT -5. The time now is 01:51 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