示例#1
0
        private static void OnExentCreated(MapInterActionHandler s, LayerEventArg e)
        {
            if (EnableMapInteraction)
            {
                if (_hAOI >= 0)
                {
                    MapWindowManager.MapLayersHandler.RemoveLayer(_hAOI);
                }
                else
                {
                    AOIName = "New AOI";
                }

                _sfAOI = new Shapefile();
                if (_sfAOI.CreateNewWithShapeID("", ShpfileType.SHP_POLYGON))
                {
                    if (_sfAOI.EditAddShape(e.SelectionExtent.ToShape()) >= 0)
                    {
                        _hAOI = MapWindowManager.MapLayersHandler.AddLayer(_sfAOI, AOIName);
                        if (_hAOI >= 0)
                        {
                            var fldName = _sfAOI.EditAddField("Name", FieldType.STRING_FIELD, 1, 1);
                            _sfAOI.Key = "aoi";
                            FormatAOI(_sfAOI);
                        }
                    }
                }
            }
        }
示例#2
0
 public static void Cleanup()
 {
     Entities.TripViewModel.MarkAllNotShownInMap();
     _mapInterActionHandler.ShapesSelected -= _mapInterActionHandler_ShapesSelected;
     _mapInterActionHandler = null;
 }
示例#3
0
 private static void _mapInterActionHandler_ShapesSelected(MapInterActionHandler s, LayerEventArg e)
 {
 }