zoukankan      html  css  js  c++  java
  • Delphi ArcEngine 闪烁显示指定点附近元素方法

    function FlashElement(aeMapControl: TMapControl; iFlashCount, iInternal: Integer;
      pColor: IColor; pPoint: IPoint): Boolean;
    var
      pEnumElement: IEnumElement;
      pElement: IElement;
      pGraphicsContainer: IGraphicsContainer;
      pMarkerSymbol: ISimpleMarkerSymbol;
      pLineSymbol: ISimpleLineSymbol;
      pFillSymbol: ISimpleFillSymbol;
      pSymbol: ISymbol;
    begin
      pGraphicsContainer := aeMapControl.Map as IGraphicsContainer;

      pEnumElement := pGraphicsContainer.LocateElements(pPoint, 10);

      if pEnumElement = nil then
        Exit(False);

      pElement := pEnumElement.Next;
      while pElement <> nil do
      begin

        case pElement.Geometry.GeometryType of
          esriGeometryPoint, esriGeometryMultipoint:
            begin
              pMarkerSymbol := CoSimpleMarkerSymbol.Create as ISimpleMarkerSymbol;
              pMarkerSymbol.Color := pColor;
              pMarkerSymbol.Style := esriSMSCircle;

              pSymbol := pMarkerSymbol as ISymbol;
            end;

          esriGeometryLine, esriGeometryPolyline:
            begin
              pLineSymbol := CoSimpleLineSymbol.Create as ISimpleLineSymbol;
              pLineSymbol.Color := pColor;
              pLineSymbol.Style := esriSLSSolid;
              pSymbol := pLineSymbol as ISymbol;
            end;

          esriGeometryPolygon:
            begin
              pFillSymbol := CoSimpleFillSymbol.Create as ISimpleFillSymbol;
              pFillSymbol.Color := pColor;
              pFillSymbol.Style := esriSFSSolid;
              pSymbol := pFillSymbol as ISymbol;
            end;
        end;
        aeMapControl.FlashShape(pElement.Geometry, iFlashCount, iInternal, pSymbol);
        pElement := pEnumElement.Next;
      end;
      Result := True;
    end;
  • 相关阅读:
    phpmyadmin详细的图文使用教程
    从入门到深入FIDDLER 2
    TestNG学习-001-基础理论知识
    TestNG学习-002-annotaton 注解概述及其执行顺序
    自动化测试如何解决验证码的问题
    自动化测试 -- 通过Cookie跳过登录验证码
    JMeter学习-012-JMeter 配置元件之-HTTP Cookie管理器-实现 Cookie 登录
    自动化测试框架
    并发和并行概念及原理
    匿名内部实现多线程的两种方式创建
  • 原文地址:https://www.cnblogs.com/chinacodegear/p/1425456.html
Copyright © 2011-2022 走看看