'图层放大,Map1.TrackRectangle是用户画出的矩形范围
Dim tmpExtent As MapObjects2.Rectangle
Set tmpExtent = Map1.TrackRectangle
If Not tmpExtent Is Nothing Then
Set Map1.Extent = tmpExtent
End If
'图层缩小,下面缩小1.5倍
tmpExtent.ScaleRectangle 1.5
Map1.Extent = tmpExtent
'全图
Set Map1.Extent = Map1.FullExtent
'移动
Map1.Pan
责任编辑:小草