if (MapView.Active == null) return;
            Map map = MapView.Active.Map;
            if (map == null) return;

            try
            {
                string Layerurl = @"E:\ff\G48G082023.gdb\jfb10000注记"; //@"E:\ff\G48G082023.gdb\dltb3d_地类符号生成";
                Uri uri = new Uri(Layerurl);
                await QueuedTask.Run(() => LayerFactory.Instance.CreateLayer(uri, map));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }

文件路经 只能"\",不能/

   if (MapView.Active == null) return;
            Map map = MapView.Active.Map;
            if (map == null) return;

            try
            {
                string Layerurl = @"F:\2020book\toolforpro\影像裁剪\my.img"; //@"E:\ff\G48G082023.gdb\dltb3d_地类符号生成";
                Uri uri = new Uri(Layerurl);
                await QueuedTask.Run(() => LayerFactory.Instance.CreateLayer(uri, map));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }

 

相关文章: