MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Zoom to Waypoint

This is a discussion on Zoom to Waypoint within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; having a problem zooming to a waypoint. I have a route setup but cannot figure out how to zoom to ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-27-2003
Junior Member
White Belt
 
Join Date: Jan 2003
Posts: 2
Zoom to Waypoint

having a problem zooming to a waypoint. I have a route setup but cannot figure out how to zoom to a specified waypoint.

also - zoom to route. this is an option in the EXE but i cannot find out how to do in code.

using VB.NET with MP2K

thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-14-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Zoom to Waypoint

To zoom to a single waypoint, try the following untested code:

Code:
mpApp.ActiveMap.ActiveRoute.Waypoints.Item(1).Location.GoTo
    mpApp.ActiveMap.Altitude = 10 ' Or whatever
To zoom to multiple waypoints:
Code:
mpApp.ActiveMap.Union(wp1, wp2, wp3).GoTo
N-Joy.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 09-08-2004
Junior Member
White Belt
 
Join Date: May 2004
Posts: 9
Proper Altitude Calculation and finding points within radius

I just got done a little project and wanted to share something I figured out in case it helps other people who might have similar issues.

Tasks: Given a point, find all pushpins within XX miles radius of that point. Also draw a circle showing the search area and zoom the image to show the full circle.

Assuming you've already plotted your pushpins, gotten the Location Object for your search point and determined what radius you want to use. Here's how you do each step:

Code:
' Set altitude/zoom
' Notes: This was determined by trial and error but seems to work great
objMap.Altitude = Round(radius + (radius * 3.25))
Code:
' Draw circle
' Notes: Ok, is MS just confused?  They say 'radius' but they must mean 
' X diameter and Y diameter.  So we multiple radius by 2
objMap.Shapes.AddShape geoShapeOval, objORGLoc, radius * 2, radius * 2
Code:
' Find all pushpins within the circle
' Notes: objORGLoc is my 'origin location', the point I'm searching from
' orig_org is the name of the origin, the IF statement makes sure to
' exclude the pushpin for the origin location
' I also draw a line from origin to the pushpin to make it more visible

Set objRecords = objMap.DataSets.Item(1).QueryCircle(objORGLoc, radius)
        
objRecords.MoveFirst
Do While Not objRecords.EOF
    If objRecords.Pushpin.Name <> orig_org Then
        lngCount = lngCount + 1
        i = lngCount + 24
        Range("A" & i).Value = objRecords.Pushpin.Name
        Range("B" & i).Value = Round(objORGLoc.DistanceTo(objRecords.Pushpin.Location))
                
        Set objLine = objMap.Shapes.AddLine(objORGLoc, objRecords.Pushpin.Location)
        objLine.Line.Weight = 1
        objLine.Line.ForeColor = vbBlue
        'objLine.ZOrder geoSendBehindRoads
        objLine.Line.EndArrowhead = False
    End If
    objRecords.MoveNext
Loop

I thought with the radius/diameter mixup and the trial and error on the altitude calculation, that this information might be helpful to someone.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 09-08-2004
Junior Member
White Belt
 
Join Date: May 2004
Posts: 9
Ok, I found another article that says that the zoom/altitude setting varies by screen size and resolution. Here's an article MS published on how to get the accurate zoom no matter what resolution or screen size:

http://support.microsoft.com/?kbid=297348


For reference, the application I was using was an Excel spreadsheet with MP embedded. A pretty small little box containing mappoint (too lazy to measure pixels right now, but it spans from A4 to F20 approx with roughly default Excel cell sizes... yeah, I'm being seriously lazy here, just aiming for a ballpark # to share with you guys).

-TG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
waypoint, zoom


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Geocoordinates from a waypoint chpw MapPoint 2006/2009 Discussion 6 04-05-2006 10:53 AM
address from waypoint starbuck MapPoint 2006/2009 Discussion 7 11-18-2003 09:04 AM
Put a waypoint! Anonymous MapPoint 2006/2009 Discussion 1 11-14-2003 10:44 AM
Zoom In and Zoom Out event detection victorf MapPoint 2006/2009 Discussion 2 10-22-2003 01:56 AM
Route Waypoint Name Vic MapPoint 2006/2009 Discussion 1 10-03-2002 04:00 PM


All times are GMT -5. The time now is 12:14 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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