MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Which method to view the Map of the actual Route

This is a discussion on Which method to view the Map of the actual Route within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Can somone tell me the method, which i must use to print the actual route in the map window? I ...


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 11-25-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
Which method to view the Map of the actual Route

Can somone tell me the method, which i must use to print the actual route in the map window?
I mean the same function, when i click on the overview (the first row) in the directions pane.
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 11-25-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,094
Hi,

Something like this:

Code:
            if (prntDlg.DialogResult != DialogResult.OK)
                return;

            try {
                MP.ActivePrinter = prntDlg.SelectedPrinter.Items[prntDlg.SelectedPrinter.SelectedIndex].ToString();
                MP.ActiveMap.PrintOut("",
                                      prntDlg.Title.Text,
                                      (int)prntDlg.Aantal.Value,
                                      prntDlg.GeoPrint,
                                      (GeoPrintQuality)prntDlg.Quality,
                                      (GeoPrintOrientation)prntDlg.Orientation,
                                      prntDlg.Collate.Checked,
                                      prntDlg.Legend.Checked,
                                      prntDlg.Overview.Checked,
                                      prntDlg.Faxable.Checked);
Where prntDlg.GeoPrint is one of these values:

Code:
        geoPrintMap = 0,
        geoPrintDirections = 1,
        geoPrintTurnByTurn = 2,
        geoPrintStripMaps = 3,
        geoPrintSelectedArea = 4,
        geoPrintHighlightedPlaces = 5,
        geoPrintFullPage = 6,
I think you need geoPrintDirections. prntDlg is just a form with the printer parameters and settings on what/how to print.
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 11-25-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
I think you've misunderstood me , sorry. I dont mean the printerdialog. What i need is the method to draw the map with the route on monitor.

A short description of my problem
Now i use the method "Union (Returns a Location object that represents the best map view to display all of the specified locations)" where i have added all Waypoints. But for example, if the Street of my highest Waypoint gos first up and then down, this piece of my route will not displayed on the mapview. That means, i need a mapview where my complete route is shown on the map.

thanks a lot for your help
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 11-26-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,094
Hi,

I'm not sure I understeand it again

if you call: route.Calculate(); then the map will zoom to the specified route and it is complete on the screen, unless you do something with the map that it will pan or zoom.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 11-26-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
Yes thats right! But if the route is calculated, then he does not zoom to route if i use the calculate again. Because MP don't calc the route again. At first i must change somthing on route, then he will do it.
But at second, if the calculate will work again, thats not the best solution for this "problem".
I'm thinking that there is a methode i can call, that will do it. But i didnt found it anywhere at the Mappoint programmers reference.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 11-26-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,094
Hi,

Quote:
if the route is calculated, then he does not zoom to route if i use the calculate again.
It does when you first call:
Code:
route.Clear();
and then you call Calculate() agein and it will zoom to it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 11-26-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
Code:
route.Clear();
from Mappoint Programming Reference
Clears a route from the map, removing all waypoints (start point, stops, and end point); similar to clicking Clear Route on the Route menu.
Thats not what i want, i need my Waypoints further. I give you an example:
I have calculated a route. Now maybe i click on an waypoint, the map zoom to the waypoint i've selected. How do i go back to my complete route on map. Now you can say use the GoBack method, where i can go back to my last mapview. But if i have select 2 or more waypoints in a row, that doesn't work to view my complete route again.
Do you know what i mean?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 11-27-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,094
Hi,

Aaaah I think I understeand finally

You calc route and wants to save that view to return to it later...

Yes very easy, something like this:

Code:
            int x = MP.Width / 2;
            int y = MP.Height / 2;
            Location Loc = MP.ActiveMap.XYToLocation(x, y);
            pos.CalcPos(Loc, out Lat, out Lon);
            Alt = MP.ActiveMap.Altitude;
so remember the coordinates and you can easy go back to it using GotoLatLong method. for the CalcPos search for it in this forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 11-27-2005
Junior Member
White Belt
 
Join Date: Nov 2005
Posts: 10
Send a message via ICQ to oschulz
Well, thanks for your hard work with me.

After a long odyssey through the MP Reference, i think i have the right function

Code:
Location property (Directions)
Returns the Location object that represents the best map view of the part of the route represented by the particular Directions collection, which may be the entire route or a portion of the route. Read-only.
But i have to try it at work

thanks a lot
__________________
Oliver Schulz
MYCOM AG
www.mycom-net.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 11-29-2005
calv1ns's Avatar
Member
Green Belt
 
Join Date: Mar 2005
Posts: 91
Yikes this is hard...

Code:
  Sub ZoomRoute()

  Dim objApp As New MapPoint.Application
  Dim objMap As MapPoint.Map
  Dim objRoute As MapPoint.Route

  'Set up the application
  Set objMap = objApp.ActiveMap
  Set objRoute = objMap.ActiveRoute
  objApp.Visible = True
  objApp.UserControl = True

  'Add route stops and calculate route
  With objRoute.Waypoints
    .Add objMap.FindResults("Seattle, WA").item(1)
    .Add objMap.FindResults("Redmond, WA").item(1)
    .Add objMap.FindResults("Tacoma, WA").item(1)
    .Add objMap.FindResults("Bellevue, WA").item(1)
  End With
  objRoute.Calculate
  objMap.FindResults("New York, NY").item(1).Goto
  MsgBox ("Hello NYC")
  
  objMap.ActiveRoute.Directions.Location.Goto
  
  End Sub
This calculates the route then zooms to New York (as an example of user actions) then rezooms to the calculated route.

Ciao,
__________________
Calv1ns
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
actual, map, method, route, view


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
Using VB6 to Link to SQL View takk MapPoint 2006/2009 Discussion 2 12-08-2004 10:51 PM
3D View Anonymous Wish List 0 06-06-2003 05:19 PM
One country view only? Anonymous MapPoint 2006/2009 Discussion 1 04-18-2003 10:45 AM
Method FindNearby() with a route object Anonymous MapPoint 2006/2009 Discussion 3 12-19-2002 08:06 AM
What is the actual limit? Anonymous MapPoint 2006/2009 Discussion 1 09-03-2002 02:53 PM


All times are GMT -5. The time now is 06:37 AM.


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

Ski Resort in Italy
For a superb value skiing destination look no further than Italy. Book in at a ski resort in Italy to combine great skiing with great cuisine. Holiday Hypermarket offers value for money.

Late Deal Holidays
Whatever your travel needs, city breaks, late deal holidays, luxury holidays or family holidays - your personal Travel Counsellor can help

Italy Holiday
An Italy Holiday is full of interesting stuff for the casual tourist and even more for the educated visitor. Check out the latest great deals at dealchecker.co.uk.

Dominican Republic Holidays
Dominican Republic holidays have something to offer for everyone. From water sports, to sun bathing and more, enjoy a holiday there!

Turkey
Before booking a holiday to Turkey check out the ULookUBook travel guide. Find out about the rich culture in Turkey before you go there to help you to make the most of your holiday.

Price Comparison
Price comparison is the name of the game at Travel.co.uk. Visit our website and see for yourself.

Cheap Gran Canaria Holidays
Want to take a break and visit the Canary Islands? Get information on cheap Gran Canaria holidays at On The Beach.


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