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

Pushpins

This is a discussion on Pushpins within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi guys, I am trying to integrate mappoint with our application, I was able to locate the addresses that we ...

  1. #1
    amanuel is offline Junior Member White Belt
    Join Date
    Aug 2002
    Posts
    11

    Pushpins

    Hi guys,
    I am trying to integrate mappoint with our application, I was able to locate the addresses that we want on mappoint However when i select those pushpins that i have added it seems like i can only find the one that i clicked on. Here is my code
    If TypeOf g_oApp.ActiveMap.Selection Is Pushpin Then
    msgbox g_oApp.ActiveMap.Selection.Name
    End If
    what i want to know is, if there is a collection which holds all the selected pushpins.
    Thank you

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Yes, the collection is a Dataset. This sample my help, here I'm using a Mappoint ActiveX Control named MPC. (By Default it would be named MappointControl1.)

    Dim objDataSet As MapPointCtl.DataSet
    Dim objmap As MapPointCtl.Map
    Dim objRecordset As MapPointCtl.Recordset

    Set objmap = MPC.ActiveMap
    For Each objDataSet In objmap.DataSets
    If InStr(objDataSet.Name, "My Pushpins") Then
    Set objRecordset = objDataSet.QueryAllRecords
    'objDataSet.ZoomTo
    Do Until objRecordset.EOF
    objRecordset.Pushpin.Symbol = 20
    objRecordset.MoveNext
    Loop
    End If
    Next

  3. #3
    amanuel is offline Junior Member White Belt
    Join Date
    Aug 2002
    Posts
    11
    John,
    Your solution gives me all the pushpins in the dataset, but what i want is the once which are selected or highlighted.

  4. #4
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    This will only change the pushpin if it is highlighted.

    Dim objDataSet As MapPointCtl.DataSet
    Dim objmap As MapPointCtl.Map
    Dim objRecordset As MapPointCtl.Recordset

    Set objmap = MPC.ActiveMap
    For Each objDataSet In objmap.DataSets
    If InStr(objDataSet.Name, "My Pushpins") Then
    Set objRecordset = objDataSet.QueryAllRecords
    'objDataSet.ZoomTo
    Do Until objRecordset.EOF
    If objRecordset.Pushpin.Highlight = True Then
    objRecordset.Pushpin.Symbol = 20
    End if
    objRecordset.MoveNext
    Loop
    End If
    Next

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Creating a subset of Pushpins from a set of pushpins
    By paf33 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-09-2005, 04:54 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 82 83