Esempio n. 1
0
        private void OnMapperForm_Load(object sender, EventArgs e)
        {
            MapControl = axMap;
            toolstripToolBar.ClickThrough = true;
            Text = "Map";
            global.LoadFormSettings(this);
            _mapLayersHandler = new MapLayersHandler(axMap);
            _mapLayersHandler.OnLayerVisibilityChanged += OnMapLayerVisibilityChanged;
            _mapLayersHandler.CurrentLayer             += OnCurrentMapLayer;
            _mapLayersHandler.LayerRead += OnMapLayerRead;
            _mapInterActionHandler       = new MapInterActionHandler(axMap, _mapLayersHandler)
            {
                MapContextMenuStrip = menuDropDown
            };

            if (global.MappingMode == fad3MappingMode.defaultMode)
            {
                _mapLayersHandler.LoadMapState();
            }
            else
            {
                tsButtonSave.Enabled = false;
            }
            ConfigureMapControl();
            SetCursor(tkCursorMode.cmSelection);
            EventHandler handler = MapperOpen;

            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
            global.MappingForm = this;
            MapLegend          = new MapLegend(MapControl, _mapLayersHandler);
        }
Esempio n. 2
0
        public void CreateGrid25MajorGrid(fadUTMZone utmZone)
        {
            UTMZone                  = utmZone;
            _grid25MajorGrid         = new Grid25MajorGrid(axMap);
            _grid25MajorGrid.UTMZone = utmZone;
            _grid25MajorGrid.GenerateMajorGrids();
            _grid25MajorGrid.MaplayersHandler      = _mapLayersHandler;
            _grid25MajorGrid.MapInterActionHandler = _mapInterActionHandler;
            axMap.GeoProjection.SetWgs84Projection(_grid25MajorGrid.Grid25Geoprojection);
            axMap.MapUnits = tkUnitsOfMeasure.umMeters;

            var h = _mapLayersHandler.AddLayer(Grid25MajorGrid.Grid25Grid, "Grid25", true, true);

            _mapLayersHandler.LoadMapState(false);
            _grid25MajorGrid.MoveToTop();
            _mapLayersHandler.set_MapLayer(h);
        }