Community of VE/MapPoint Users and Developers
This is a discussion on Disabling the Direction sub window ? within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Re: Disabling the Direction sub window ?
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;
|
| |||
| Re: Disabling the Direction sub window ?
Possibly axMappointControl1.Object.ActiveMap.ItineraryVisib le = False |
| |||
| 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;
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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();
}
}
|
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 |
| |||
| Re: Disabling the Direction sub window ? Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| direction, disabling, window |
| ||||
| Posted By | For | Type | Date | |
| Formatting coordinates with DmsFormat, linking to weather data, three new utilities - MP2K Update Archives - MP2K Magazine | This thread | Refback | 11-23-2006 12:05 PM | |
| Microsoft MapPoint 2006 - MP2K Magazine | This thread | Refback | 11-21-2006 11:14 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disabling closing of MapPoint? | MD2000 | MapPoint 2006/2009 Discussion | 1 | 05-09-2005 05:57 PM |
| Disabling the Save Pop up when application closes | Anonymous | MapPoint 2006/2009 Discussion | 2 | 02-10-2005 11:58 PM |
| Disabling cut option | Anonymous | MapPoint 2006/2009 Discussion | 0 | 07-09-2004 04:05 AM |
| disabling deleting pushpin | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-28-2004 09:14 AM |
| Disabling Cntl Key Functions from MapPoint Control | Anonymous | MapPoint 2006/2009 Discussion | 2 | 03-18-2003 07:06 AM |