I want to disable the direction sub window that appear on part of map when the directions are processed.
Any one has the solution ?
This is a discussion on Disabling the Direction sub window ? within the MapPoint Desktop Discussion forums, part of the Map Forums category; I want to disable the direction sub window that appear on part of map when the directions are processed. Any ...
I want to disable the direction sub window that appear on part of map when the directions are processed.
Any one has the solution ?
Itinerary.Visible = False
Thanks for your answer, but Itinerary.Visible is not recognized on my VS 2005 (C# language)
Should I use a specific Using ?
I already use Using Mappoint.
I also zlready tried before posting this :
axMappointControl1.ItineraryVisible = false;
but, it didn't work neither.
Here is more of my code used :
Code:InitializeComponent(); axMappointControl1.NewMap(MapPoint.GeoMapRegion.geoMapEurope); axMappointControl1.ItineraryVisible = false;
Possibly axMappointControl1.Object.ActiveMap.ItineraryVisib le = False
Hi,
No it is the activeX component itself that you have to address. This works here:
MP is the name of the axMappointcontrol I use here. And yes I just copyd this from VS2005 and C#.Code:MP.ItineraryVisible = false;
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
That's what I did (look code below) but with no results...
Are we speaking about the sub window that is masking a part of the map ?
- Maybe I didn't insert the line at the good place ?
- Maybe I wrote lines that would affect the result ?
Well, I give you my full code (an evaluating program that I do to discover Mappoint).
Look only at blue line in the code.
Code:public partial class Form1 : Form { static public MapPoint.Map map; static MapPoint.Application app = null; private void axMappointControl1_BeforeClick(object sender, AxMapPoint._IMappointCtrlEvents_BeforeClickEvent e) { int nXCoord = e.x; int nYCoord = e.y; if (e.button == MapPoint.GeoMouseButtonConstants.geoRightButton) { e.cancel = true; } Location loc = map.XYToLocation(nXCoord, nYCoord); if (Location != null) { } } private void axMappointControl1_SelectionChange(object sender, AxMapPoint._IMappointCtrlEvents_SelectionChangeEvent e) { Pushpin pPrev = e.pOldSelection as MapPoint.Pushpin; Pushpin pCur = e.pNewSelection as MapPoint.Pushpin; if (pPrev != null) { pPrev.Highlight = false; // pPrev.Cut(); } if (pCur != null) { pCur.Highlight = true; } } public Form1() { Process[] processes = Process.GetProcessesByName("MapPoint"); foreach (Process proc in processes) proc.Kill(); InitializeComponent(); axMappointControl1.NewMap(MapPoint.GeoMapRegion.geoMapEurope); map = axMappointControl1.ActiveMap; app = map.Application; map.MapStyle = GeoMapStyle.geoMapStyleTerrain; object TOOLBAR_NAVIGATION = 2; axMappointControl1.Toolbars.get_Item(ref TOOLBAR_NAVIGATION).Visible = true; //axMappointControl1.PaneState = MapPoint.GeoPaneState.geoPaneRoutePlanner; axMappointControl1.ItineraryVisible = false; //map.AllowEdgePan = false; axMappointControl1.Units = MapPoint.GeoUnits.geoKm; axMappointControl1.BeforeClick += new AxMapPoint._IMappointCtrlEvents_BeforeClickEventHandler(axMappointControl1_BeforeClick); axMappointControl1.SelectionChange += new AxMapPoint._IMappointCtrlEvents_SelectionChangeEventHandler(axMappointControl1_SelectionChange); //************************************************* // Création d'un point par géocodage //************************************************* MyAdresse ad1 = new MyAdresse(); MyAdresse ad3 = new MyAdresse(); MyAdresse ad4 = new MyAdresse(); { ad1.sadAdx.sStreetAdresse = "18 rue hoche"; ad1.sadAdx.sCity = "grenoble"; //ad1.sadAdx.sStreetAdresse = "13 avenue hoche"; //ad1.sadAdx.sCity = "paris"; ad1.Geocode(); ad1.pin = map.AddPushpin(ad1.loc, "AD1"); ad3.sadAdx.sStreetAdresse = "1 rue kleber"; ad3.sadAdx.sCity = "Grenoble"; ad3.Geocode(); ad3.pin = map.AddPushpin(ad3.loc, "AD3"); ad4.sadAdx.sStreetAdresse = "1 rue Marcel Porte"; ad4.sadAdx.sCity = "Grenoble"; ad4.Geocode(); ad4.pin = map.AddPushpin(ad4.loc, "AD4"); } //************************************************* // Création d'une Pushpin à partir de X,Y en coord GPS //************************************************* MyAdresse ad2 = new MyAdresse(); { ad2.loc = map.GetLocation(45.17994847, 5.723539487, 1); ad2.pin = map.AddPushpin(ad2.loc, "AD2"); ad2.pin.Symbol = 4; } //ad2.loc.GoTo(); //map.Altitude = 1.0; //************************************************* // Centrage de la carte //************************************************* { ArrayList tloc = new ArrayList(); tloc.Add(ad1.loc); tloc.Add(ad2.loc); Location locCenter = map.Union(tloc.ToArray()); locCenter.GoTo(); map.Altitude = 2.0; } //************************************************* // Itinéraire entre deux points //************************************************* if (0==0) { MapPoint.Route rt = map.ActiveRoute; Waypoint wp1 = rt.Waypoints.Add(ad1.loc, "AD1"); wp1.SegmentPreferences = GeoSegmentPreferences.geoSegmentShortest; rt.Waypoints.Add(ad2.loc, "AD2"); rt.Waypoints.Add(ad3.loc, "AD3"); rt.Waypoints.Add(ad4.loc, "AD4"); //rt.Waypoints.Optimize(); rt.Calculate(); } }
Hi,
you have to call it aftter Calculate method.
I assume you dont have a compile time error but just no result ? Please be more clear in future.
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Bingo !
That was the solution.
Place the line at the good place.
Thanks a lot and sorry not to be clear enough. I'm french and not fluent.
Thanks again![]()
Ok, me too not englisch spokenThanks a lot and sorry not to be clear enough. I'm french and not fluent.
Thanks again![]()
![]()
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)