从GIS浩淼的天空看到的一篇用IFeatureIdentifyObj实现闪烁功能,不过这方法AE不支持。
要在AE实现闪烁功能,一个方法是用IHookActions.DoActions()方法搭上esriHookActionsFlash作为动作。
IHookActions的定义如下
pUnknown必须是实现了IEnvelope, IPoint, IPolygon 或者 IPolyline 的geometry对象,
而且该geometry不应该为空。
Action方面有6个constant,可以根据需要选择.
|
Constant |
Value |
Description |
|
esriHookActionsFlash |
0 |
Flash the geometry. |
|
esriHookActionsPan |
1 |
Pan to the geometry. |
|
esriHookActionsZoom |
2 |
Zoom to the geometry. |
|
esriHookActionsGraphic |
3 |
Create a graphic for the geometry. |
|
esriHookActionsLabel |
4 |
Create a graphic and label for the geometry. |
|
esriHookActionsCallout |
5 |
Create a callout for the geometry. |
完成闪烁的代码如下:
Dim hookActions as IHookActions
hookActions.DoAction(feature.Shape, esriHookActions.esriHookActionsPan)
Application.DoEvent();hookActions.DoAction(feature.Shape,esriHookActions.esriHookActionsFlash)