引用
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