超图 wpf地图控件加载地图

引用

System.Windows.Forms
WindowsFormsIntegration
SuperMap.Mapping

使用

前端xaml

	

后端代码加载Map

private Workspace showMapWorkspace;
private MapControl showMapControl;

showMapWorkspace = new Workspace();
showMapWorkspace.Open(new WorkspaceConnectionInfo(@"path.smwu"));

showMapControl = new MapControl();
showMapControl.Action = SuperMap.UI.Action.Pan;
//必须设置
showMapControl.Map.Workspace = showMapWorkspace;
showMapControl.Map.Open(showMapWorkspace.Maps[0]);

//赋值给前端控件hostMapControl
hostMapControl.Child = showMapControl;

示例代码

LoadMap
官方示例在\SampleCode\Constrols\ControlsInteractionWPF\ControlsInteractionWPF.csproj

上一篇:图论 ---- E. Bear and Forgotten Tree 2(判补图的联通性技巧 图遍历的优化 条件拆分)


下一篇:【ONE学习笔记】将One导入Eclipse中