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

Drawing / Zoom

This is a discussion on Drawing / Zoom within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I have to draw Arrows between two points and then I want both points to be in the zoom ...

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

    Drawing / Zoom

    Hi,
    I have to draw Arrows between two points and then I want both points to be in the zoom and not only one.

    Code:
    Dim objApp As New MapPoint.Application
    Dim objMap As MapPoint.Map
    Dim objLoc1 As MapPoint.Location
    Dim objLoc2 As MapPoint.Location
    Dim Arrow As MapPoint.Shape
    Dim begin As String
    Dim finish As String
    
    'Set up the application
    Set objMap = objApp.ActiveMap
    objApp.Visible = False
    objApp.UserControl = True
    
    'Get two locations and zoom to it
    begin = TextBox1.Value
    finish = TextBox2.Value
    Set objLoc1 = objMap.FindResults(begin).Item(1)
    Set objLoc2 = objMap.FindResults(finish).Item(1)
    Set objMap.Location = objLoc1 'Zoom to begin
      
    'Add an Arrow from one location to the other
    Set Arrow = objMap.Shapes.AddLine(objLoc1, objLoc2)
    Arrow.Line.EndArrowhead = True
    Arrow.Line.Weight = 1
    Arrow.SizeVisible = True
      
    objApp.Visible = True
    Thanks for your help

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    I think this should do it:

    Code:
    MP.ActiveMap.DataSets.ZoomTo();

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mappoint-ZOOM
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-28-2004, 08:56 AM
  2. Zoom to Waypoint
    By BobIDEAS in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 09-08-2004, 02:41 PM
  3. Zoom to selection?
    By sthurlock in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 12-10-2003, 07:53 PM
  4. zoom in on pushpin
    By starbuck in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 10-24-2003, 12:26 PM
  5. Zoom In and Zoom Out event detection
    By victorf in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-22-2003, 01:56 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