zoukankan      html  css  js  c++  java
  • Supermap Objects API开发中禁用默认的选择集显示风格,启用自定义的显示风格的代码

            //#region 使用自定义风格设置选中状态
            Selection selection = new Selection();//从该记录集获取选择集
            selection.FromRecordset(recordsetTemp);
            selection.SetStyleOptions(StyleOptions.FillBackColor, true);
            selection.SetStyleOptions(StyleOptions.FillBackOpaque, true);
            selection.SetStyleOptions(StyleOptions.FillForeColor, true);
            selection.SetStyleOptions(StyleOptions.FillGradientAngle, true);
            selection.SetStyleOptions(StyleOptions.FillGradientMode, true);
            selection.SetStyleOptions(StyleOptions.FillGradientOffsetRatioX, true);
            selection.SetStyleOptions(StyleOptions.FillGradientOffsetRatioY, true);
            selection.SetStyleOptions(StyleOptions.FillOpaqueRate, true);
            selection.SetStyleOptions(StyleOptions.FillSymbolID, true);
            selection.SetStyleOptions(StyleOptions.LineColor, true);
            selection.SetStyleOptions(StyleOptions.LineSymbolID, true);
            selection.SetStyleOptions(StyleOptions.LineWidth, true);
            selection.SetStyleOptions(StyleOptions.MarkerAngle, true);
            selection.SetStyleOptions(StyleOptions.MarkerSize, true);
            selection.SetStyleOptions(StyleOptions.MarkerSymbolID, true);
            selection.IsDefaultStyleEnabled = false;//设置不使用默认选择风格
            GeoStyle geoStyle = selection.Style;//设置选择集的风格
            geoStyle.FillForeColor = Color.Blue;
            geoStyle.FillBackOpaque = false;
            geoStyle.FillBackColor = Color.Blue;
            geoStyle.FillSymbolID = 0;
            geoStyle.FillOpaqueRate = 0;
            geoStyle.LineColor = Color.Blue;
            geoStyle.LineWidth = 1.0;
            selection.Style = geoStyle;
            layer.Selection = selection;
            #endregion
  • 相关阅读:
    Nginx配置文件
    SSM三层模型之间的参数传递
    Junit4用法
    常量类的设计
    初识Oracle
    sss
    sss
    sss
    sss
    sss
  • 原文地址:https://www.cnblogs.com/rainbow70626/p/13640979.html
Copyright © 2011-2022 走看看