private void OnWindowLoaded(object sender, RoutedEventArgs e) { System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost(); MapControl = new AxMapWinGIS.AxMap(); host.Child = MapControl; MapGrid.Children.Add(host); MapLayersHandler = new MapLayersHandler(MapControl); MapInterActionHandler = new MapInterActionHandler(MapControl, MapLayersHandler); MapControl.ZoomBehavior = tkZoomBehavior.zbDefault; if (MapWindowManager.MapStateFileExists) { MapWindowManager.RestoreMapState(this); menuMapTilesVisible.IsChecked = MapControl.TileProvider != tkTileProvider.ProviderNone; menuMapTilesSelectProvider.IsEnabled = MapControl.TileProvider != tkTileProvider.ProviderNone; } else { menuMapTilesSelectProvider.IsEnabled = false; } if (MapLayersHandler.get_MapLayer("Coastline") != null) { menuMapCoastlineVisible.IsChecked = MapLayersHandler.get_MapLayer("Coastline").Visible; } MapWindowManager.ResetCursor(); MapInterActionHandler.ShapesSelected += OnMapShapeSelected; MapLayersHandler.CurrentLayer += OnMapCurrentLayer; MapLayersHandler.OnLayerVisibilityChanged += MapLayersHandler_OnLayerVisibilityChanged; GPXMappingManager.MapInteractionHandler = MapInterActionHandler; TripMappingManager.MapInteractionHandler = MapInterActionHandler; SetButtonEnabled(); }
/// <summary> /// The functions for working with the Mapcontrol /// </summary> /// <param name="axMap"></param> public MapControlTools(AxMapWinGIS.AxMap axMap) { AxMap = axMap; Layers = new List <ILayer>(); InitTools(); }
public EditingTool(AxMapWinGIS.AxMap axMap, MapControlTools mapControlTool) : base(axMap, mapControlTool) { }