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

Disabling the Direction sub window ?

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

  1. #1
    noreli is offline Junior Member White Belt
    Join Date
    Nov 2006
    Location
    Marseille, France
    Posts
    9

    Question Disabling the Direction sub window ?

    I want to disable the direction sub window that appear on part of map when the directions are processed.

    Any one has the solution ?

  2. #2
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: Disabling the Direction sub window ?

    Itinerary.Visible = False

  3. #3
    noreli is offline Junior Member White Belt
    Join Date
    Nov 2006
    Location
    Marseille, France
    Posts
    9

    Question Re: Disabling the Direction sub window ?

    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;

  4. #4
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: Disabling the Direction sub window ?

    Possibly axMappointControl1.Object.ActiveMap.ItineraryVisib le = False

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Disabling the Direction sub window ?

    Hi,

    No it is the activeX component itself that you have to address. This works here:
    Code:
    MP.ItineraryVisible = false;
    MP is the name of the axMappointcontrol I use here. And yes I just copyd this from VS2005 and C#.

  6. #6
    noreli is offline Junior Member White Belt
    Join Date
    Nov 2006
    Location
    Marseille, France
    Posts
    9

    Unhappy Re: Disabling the Direction sub window ?

    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();
    
                }
            }

  7. #7
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Disabling the Direction sub window ?

    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.

  8. #8
    noreli is offline Junior Member White Belt
    Join Date
    Nov 2006
    Location
    Marseille, France
    Posts
    9

    Thumbs up Re: Disabling the Direction sub window ?

    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

  9. #9
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Disabling the Direction sub window ?

    Thanks a lot and sorry not to be clear enough. I'm french and not fluent.
    Thanks again
    Ok, me too not englisch spoken

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Disabling closing of MapPoint?
    By MD2000 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-09-2005, 05:57 PM
  2. Disabling the Save Pop up when application closes
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 02-10-2005, 11:58 PM
  3. Disabling cut option
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-09-2004, 04:05 AM
  4. disabling deleting pushpin
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-28-2004, 09:14 AM
  5. Disabling Cntl Key Functions from MapPoint Control
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 03-18-2003, 07:06 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 26 27