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

Zoom to selection?

This is a discussion on Zoom to selection? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello all, In "interactive" Mappoint you can draw a shape, select it and then 'zoom to selection'. I would like ...

  1. #1
    sthurlock is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    12

    Zoom to selection?

    Hello all,
    In "interactive" Mappoint you can draw a shape, select it and then 'zoom to selection'. I would like to do this in VB with a shape I am creating but the zooming methods seem limited. I would also like to do it without changing the contents or ordering of the current route. Any thoughts on how to do this?

    The code:
    'waypoints have been added and the route has been optimized
    ' now add a circle of diam 0.75 miles on the second stop
    Set objShape = MPMap.Shapes.AddShape(geoShapeRadius,_
    MPMap.ActiveRoute.Waypoints.Item(2).Location, 0.75, 0.75)
    ' now query contents of circle, select circle and zoom on circle:
    Set objRecordset = objDataSet.QueryShape(objShape)
    objShape.Select
    ???

    many thanks,
    sthurlock

  2. #2
    Mossoft is offline Member Yellow Belt
    Join Date
    Feb 2003
    Posts
    48
    Dont think you need to select shape, just use objRecordset.ZoomTo

    M.

  3. #3
    sthurlock is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    12
    That actually doesn't work. According the programming guide, ZoomTo only applies to DataSets, but this is a RecordSet. I tried it and it gives a "method not found". Any other thoughts?

  4. #4
    Mossoft is offline Member Yellow Belt
    Join Date
    Feb 2003
    Posts
    48
    Ooops.

    Try:

    objShape.Location.GoTo

    M.

  5. #5
    sthurlock is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    12
    That is very close to what I'm looking for! I'd like to be able to control the closeness of the zoom by drawing a circle of radius r, zooming to it, then removing the circle and printing a map. In 'interactive' mode, drawing a circle with r=0.75, selecting the circle and then zooming 'to selected' gives a certain zoom. Going to a circle with r=0.5 gives a closer zoom, r=0.25 is closer still. Really, I'm trying to work around the fact that the .zoomIn and .zoomOut methods have very large steps in their zoom. More thoughts?

    sthurlock

  6. #6
    Mossoft is offline Member Yellow Belt
    Join Date
    Feb 2003
    Posts
    48
    Instead of using ZoomIn and ZoomOut, try using the Altitude property of the map:

    objApp.ActiveMap.Altitude = <a number suitable for the size of circle>

    M.

  7. #7
    sthurlock is offline Junior Member Yellow Belt
    Join Date
    Dec 2003
    Posts
    12
    Brilliant! That appears to do exactly what I'm looking for! I need to play around a little to get the exact right altitude. Thank you very much for your help!!

    sthurlock

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pushpin Selection
    By EdB in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-14-2005, 10:25 AM
  2. Getting dataset from user selection
    By mic6399 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-23-2004, 11:59 AM
  3. Zoom In and Zoom Out event detection
    By victorf in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-22-2003, 01:56 AM
  4. Identifying Selection with Mouse
    By MapPointJim in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-20-2002, 05:39 PM
  5. Have successfully exported a map selection from Ma....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-05-2001, 05:14 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