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

find mileage using two zipcodes onlh

This is a discussion on find mileage using two zipcodes onlh within the MapPoint Desktop Discussion forums, part of the Map Forums category; Is it possible to find the mileage by using only a zipcode for starting point and then use a zipcode ...

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

    find mileage using two zipcodes onlh

    Is it possible to find the mileage by using only a zipcode for starting point and then use a zipcode for destination.

  2. #2
    Joakim is offline Junior Member White Belt
    Join Date
    Jun 2003
    Posts
    11

    Finding mileage with zip codes only..

    If you are using a city, postal code or place doesn't matter. You will always get a location object back that you can use to get your distance.

    An example (Use a form with a MapPoint OCX, a textbox, a listbox and two commandbuttons where Command1 calculates the route and Command2 clear the route):
    -------------------------------------------------
    Dim MyRoute As MapPointCtl.Route

    Private Sub Command1_Click()
    If Not MyRoute Is Nothing Then
    If MyRoute.Waypoints.Count > 1 Then
    MyRoute.Calculate
    Else
    MsgBox "Need more Waypoints!", vbExclamation
    End If
    End If
    End Sub

    Private Sub Command2_Click()
    Me.List1.Clear
    MyRoute.Clear
    Me.MappointControl1.ItineraryVisible = False
    End Sub

    Private Sub Form_Load()
    Me.MappointControl1.NewMap MapPointCtl.geoMapEurope
    Set MyRoute = Me.MappointControl1.ActiveMap.ActiveRoute
    End Sub

    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    Dim MyMap As MapPointCtl.Map
    Dim MyResult As Object

    Set MyMap = Me.MappointControl1.ActiveMap
    If KeyCode = KeyCodeConstants.vbKeyReturn Then
    Set MyResult = MyMap.ShowFindDialog(Me.Text1.Text)
    If Not MyResult Is Nothing Then
    If MyResult.Name > " " Then
    Me.List1.AddItem MyResult.Name
    MyRoute.Waypoints.Add MyResult, MyResult.Name
    Me.Text1.Text = ""
    End If
    End If
    End If
    End Sub
    -----------------------------------

    /Joakim Tornhill
    SpedSoft AB
    http://www.spedsoft.se
    SpedSoft AB has been working with MapPoint since version 2000 and have the longest experience in Sweden on MapPoint.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. zipcodes
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-16-2005, 09:31 AM
  2. Creating Mileage Charts
    By ekrupa in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-30-2004, 09:37 AM
  3. Mileage Chart
    By mpnewb in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 09-07-2004, 08:32 AM
  4. mileage report for employees
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-11-2004, 07:34 AM
  5. Retrieving mileage & time
    By EJBATL in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-30-2003, 03:20 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