Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

MappointControl and Pushpin

This is a discussion on MappointControl and Pushpin within the MapPoint Desktop 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 ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

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

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    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

  3. #3
    jdwhytie is offline 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

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Outstanding! Thank you very much!!! I appreciat very much!

  5. #5
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    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!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mappointcontrol on IPAQ PDA
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-28-2006, 10:50 AM
  2. MapPointControl Windowless / VB6
    By Guido Mitschke in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 12-29-2005, 01:13 PM
  3. [C#] MappointControl - Pushpin symbol
    By suamikim in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 11-23-2005, 02:02 AM
  4. MapPointControl.ocx
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-25-2005, 09:46 AM
  5. download mappointcontrol
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-10-2004, 05:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81