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

Counting points within drivetime zone

This is a discussion on Counting points within drivetime zone within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I've plotted a number of points and have created drivetime zones around certain ones. Now, I'd like to be ...

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

    Counting points within drivetime zone

    Hi,

    I've plotted a number of points and have created drivetime zones around certain ones. Now, I'd like to be able to see what % of the total plotted points fall within the drivetime zone. How can I do that? Please help, I really need it!

  2. #2
    John Meyer's Avatar
    John Meyer is offline Senior Member Blue Belt
    Join Date
    Jul 2002
    Posts
    478
    Maria,

    Here is a VB sample to get you started. Put some pushpins in Tampa, FL for the test. Hope this helps.

    Code:
    Dim objmap As MapPointCtl.Map
    Dim objDataSet As MapPointCtl.DataSet
    Dim objRecords As MapPointCtl.Recordset
    Dim objshape As MapPointCtl.Shape
    Dim lngCount As Long
    Dim objloc1 As MapPointCtl.Location
    Dim aDriveTimeZone As MapPointCtl.Shape
    
    Set objmap = MappointControl1.ActiveMap
    Set objloc1 = objmap.FindResults("Tampa, FL").Item(1)
    Set objshape = objmap.Shapes.AddDrivetimeZone(objloc1, 20 * geoOneMinute)
    objshape.Select
    
    For Each objDataSet In objmap.DataSets
     Set objRecords = objDataSet.QueryShape(objshape)
     objRecords.MoveFirst
      Do While Not objRecords.EOF
       lngCount = lngCount + 1
        objRecords.MoveNext
      Loop
    Next
    MsgBox "Number of records in shape: " & lngCount

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Exporting Drivetime Zone coordinates
    By karlski in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 05-18-2011, 11:37 AM
  2. drivetime zone export problems
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 06-18-2003, 04:00 AM
  3. export drivetime zone
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-19-2003, 10:25 AM
  4. Find all zip codes in a drivetime zone
    By SolverDS in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-28-2002, 01:40 PM
  5. Find all zip codes within drivetime zone
    By SolverDS in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-28-2002, 01:39 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 84 85 86 87 88 89 90 91 92 93 94 95 96