文章已阅读
 

Mapcontrol

官方注释:
Mapcontrol.This class is used to provide an interface for displaying the map, and you can provide ways for the data and the map’s Interoperability.

意思就是Mapcontrol这个类用于提供显示地图的接口,您可以为数据和地图的互操作性提供方法。
所以我们经常会看到如下代码:

1
2
3
4
5
6
7
8
mapControl1.Map.Workspace = workspace1;//建立MapContorl和Workspace的连接
...
//mapControl1.Map.Open("世界地图_Day");
//通过this.workspace1.Maps.Count 查看该工作空间含有的地图的个数
//这里我们打开第一张地图
mapControl1.Map.Open(this.workspace1.Maps[0]);
//刷新地图窗口
mapControl1.Map.Refresh();

地图放大

1
2
3
4
5
mapControl1.Action = SuperMap.UI.Action.ZoomIn; //地图放大
mapControl1.Action = SuperMap.UI.Action.ZoomOut; //地图缩小
mapControl1.Action = SuperMap.UI.Action.ZoomFree; //地图自由缩放
mapControl1.Map.ViewEntire(); //地图全幅显示
mapControl1.Action = SuperMap.UI.Action.Pan; //地图漫游、平移
2023-05-31

浏览 |

© 2023 南疆 with help from Hexo and Twitter Bootstrap. Theme by Freemind.

container-narrow -->