コード例 #1
0
        protected override void LoadToMapCore()
        {
            if (File.Exists(OutputPathFileName))
            {
                var getLayersParameters = new GetLayersParameters();
                getLayersParameters.LayerUris.Add(new Uri(OutputPathFileName));
                var layers = GisEditor.LayerManager.GetLayers <ShapeFileFeatureLayer>(getLayersParameters);

                if (Application.Current != null)
                {
                    Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                    {
                        GisEditor.ActiveMap.AddLayersBySettings(layers);
                        GisEditor.UIManager.BeginRefreshPlugins(new RefreshArgs(this, RefreshArgsDescription.LoadToMapCoreDescription));
                    }));
                }
                else
                {
                    GisEditor.ActiveMap.AddLayersBySettings(layers);
                    GisEditor.UIManager.BeginRefreshPlugins(new RefreshArgs(this, RefreshArgsDescription.LoadToMapCoreDescription));
                }
            }

            ShapeFileFeatureLayerExtension.RemoveShapeFiles(clippingLayerTempPath);
        }
コード例 #2
0
        protected override void LoadToMapCore()
        {
            if (File.Exists(OutputPathFileName))
            {
                AddSimplifiedFileToMap();
            }

            ShapeFileFeatureLayerExtension.RemoveShapeFiles(tempFilePath);
        }
コード例 #3
0
        protected override void LoadToMapCore()
        {
            if (File.Exists(OutputPathFileName))
            {
                var getLayersParameters = new GetLayersParameters();
                getLayersParameters.LayerUris.Add(new Uri(OutputPathFileName));
                var layers = GisEditor.LayerManager.GetLayers <ShapeFileFeatureLayer>(getLayersParameters);
                GisEditor.ActiveMap.Dispatcher.BeginInvoke(new Action(() =>
                {
                    GisEditor.ActiveMap.AddLayersBySettings(layers);
                    GisEditor.UIManager.BeginRefreshPlugins(new RefreshArgs(this, RefreshArgsDescription.LoadToMapCoreDescription));
                }));
            }

            try
            {
                ShapeFileFeatureLayerExtension.RemoveShapeFiles(tempFilePath);
            }
            catch (Exception ex)
            {
                GisEditor.LoggerManager.Log(LoggerLevel.Error, ex.Message, ex);
            }
        }
コード例 #4
0
 protected override void LoadToMapCore()
 {
     ShapeFileFeatureLayerExtension.RemoveShapeFiles(tempFilePath);
     AddToMap();
 }