Exemplo n.º 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);
        }
 private string GetShapeFileType(String pathFileName)
 {
     if (File.Exists(pathFileName))
     {
         return(ShapeFileFeatureLayerExtension.GetShapeFileType(pathFileName).ToString());
     }
     return(notExistLabel);
 }
        protected override void LoadToMapCore()
        {
            if (File.Exists(OutputPathFileName))
            {
                AddSimplifiedFileToMap();
            }

            ShapeFileFeatureLayerExtension.RemoveShapeFiles(tempFilePath);
        }
Exemplo n.º 4
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);
            }
        }
Exemplo n.º 5
0
 protected override void LoadToMapCore()
 {
     ShapeFileFeatureLayerExtension.RemoveShapeFiles(tempFilePath);
     AddToMap();
 }