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

ensure pushpin is visible

This is a discussion on ensure pushpin is visible within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi everyone, When I add or move a pushpin, is there any way to tell if it's in the visible ...

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

    ensure pushpin is visible

    Hi everyone,

    When I add or move a pushpin, is there any way to tell if it's in the visible area of the map?

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Hope this will get you going in the right direction (ok, its a pun) I'm just counting the number of pushpins visible but you could use this to test the pushpin names compared to the name of the pushpin you just added.

    Code:
    'Query number of pushpins visible on screen
    
    Dim objmap As MapPointctl.Map
    Set objmap = MappointControl1.ActiveMap
    Dim objDataSet As MapPointctl.DataSet
    Dim objRecords As MapPointctl.Recordset
    
    Dim objLocs(1 To 5) As MapPointctl.Location
    Set objLocs(1) = objmap.XYToLocation(objmap.Left, objmap.Top)
    Set objLocs(2) = objmap.XYToLocation(objmap.Width, objmap.Top)
    Set objLocs(3) = objmap.XYToLocation(objmap.Width, objmap.Height)
    Set objLocs(4) = objmap.XYToLocation(objmap.Left, objmap.Height)
    Set objLocs(5) = objmap.XYToLocation(objmap.Left, objmap.Top)
    
    lngCount = 0
    
    For Each objDataSet In objmap.DataSets
    Set objRecords = objDataSet.QueryPolygon(objLocs)
    objRecords.MoveFirst
    Do While Not objRecords.EOF
    lngCount = lngCount + 1
    objRecords.MoveNext
    Loop
    Next
    MsgBox "Number of records in polygon: " & lngCount

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

    ensure pushpin is visible

    Thanks John,

    I'll try and get my head round that.

    Chris

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. having the driver always be visible
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 07-31-2005, 12:51 PM
  2. How to tell if an objects location is visible?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-28-2004, 08:15 AM
  3. Finding Pushpin Name by clicking on the Pushpin?(MP 2002)
    By NickSP in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 01-10-2003, 12:11 PM

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