Esempio n. 1
0
 private void ShowCellMapDrawerForm(CellMapDrawerForm form, ICellMap map, IList <Vector2Int> path)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new Action <CellMapDrawerForm, ICellMap, IList <Vector2Int> >(ShowCellMapDrawerForm), form, map, path);
         return;
     }
     Debug.WriteLine($"CellMapDrawerForm showed on thread {Thread.CurrentThread.ManagedThreadId}");
     form.ShowMap(map, path);
 }
Esempio n. 2
0
        private void GetCellMapButton_Click(object sender, EventArgs e)
        {
            BoundingRectangle rectangle = MapAroundControl.GetViewBox();
            double            width     = rectangle.Width;
            double            height    = rectangle.Height;

            double           cellSize = 4E-5;
            MapAroundCellMap cellMap  = new MapAroundCellMap(_mapAroundMap, rectangle, cellSize, cellSize);

            cellMap.AddPolygonObstaclesLayer((FeatureLayer)FindLayerByAlias("buildings"));
            //cellMap.AddPolygonObstaclesLayer((FeatureLayer)FindLayerByAlias("User region layer"));
            CellMapDrawerForm drawerForm = new CellMapDrawerForm(cellMap);

            drawerForm.Show();
        }