Community of MapPoint and Bing Maps Users and Developers
This is a discussion on Which method to view the Map of the actual Route within the MapPoint Desktop 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 ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Which method to view the Map of the actual Route I mean the same function, when i click on the overview (the first row) in the directions pane. |
| |||
|
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);
Code: geoPrintMap = 0,
geoPrintDirections = 1,
geoPrintTurnByTurn = 2,
geoPrintStripMaps = 3,
geoPrintSelectedArea = 4,
geoPrintHighlightedPlaces = 5,
geoPrintFullPage = 6,
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz www.comfortsoftware.be MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
I think you've misunderstood me 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 |
| |||
|
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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz www.comfortsoftware.be MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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. |
| |||
|
Hi, Quote:
Code: route.Clear();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz www.comfortsoftware.be MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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. 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? |
| |||
|
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;
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz www.comfortsoftware.be MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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. thanks a lot |
![]() |
| Tags |
| actual, map, method, route, view |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using VB6 to Link to SQL View | takk | MapPoint Desktop Discussion | 2 | 12-08-2004 11:51 PM |
| 3D View | Anonymous | Wish List | 0 | 06-06-2003 06:19 PM |
| One country view only? | Anonymous | MapPoint Desktop Discussion | 1 | 04-18-2003 11:45 AM |
| Method FindNearby() with a route object | Anonymous | MapPoint Desktop Discussion | 3 | 12-19-2002 09:06 AM |
| What is the actual limit? | Anonymous | MapPoint Desktop Discussion | 1 | 09-03-2002 03:53 PM |