if (MapView.Active == null) return; Map map = MapView.Active.Map; if (map == null) return; try { string Layerurl = @"E:ffG48G082023.gdbjfb10000注记"; //@"E:ffG48G082023.gdbdltb3d_地类符号生成"; 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 oolforpro影像裁剪my.img"; //@"E:ffG48G082023.gdbdltb3d_地类符号生成"; Uri uri = new Uri(Layerurl); await QueuedTask.Run(() => LayerFactory.Instance.CreateLayer(uri, map)); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); }