zoukankan      html  css  js  c++  java
  • mapxtreme2005 改变选中的图元样式

    mapxtreme2005 改变选中的图元样式

    MapInfo.Styles.CompositeStyle compositeStyle = GetOpaquesStyle(false, System.Drawing.Color.Blue);

                if (map != null)
                {
                    if (map.Layers[SysCommon.TempTableAlias] != null)
                    {
                        map.Layers.Remove(SysCommon.TempTableAlias);
                    }
                    if (map.Layers[SysCommon.TempLayerAlias] != null)
                    {
                        map.Layers.Remove(SysCommon.TempLayerAlias);
                    }
                }
                MapInfo.Engine.Session.Current.Catalog.CloseTable(SysCommon.TempTableAlias);

                MapInfo.Data.Table newtable = CreateCustomerTempTable(SysCommon.TempTableAlias, LayerAlias);
                MapInfo.Data.MIConnection conn = new MIConnection();
                conn.Open();
                MapInfo.Data.MICommand comm = conn.CreateCommand();
                comm.CommandText = "delete " + SysCommon.TempTableAlias;
                comm.Prepare();
                comm.ExecuteNonQuery();

                foreach (Feature ftr in irfc)
                {
                    comm.CommandText = "insert into " + newtable.Alias + " select * from " + LayerAlias + " where MI_Key ='" + ftr.Key + "'";              
                    comm.ExecuteNonQuery();              
                }                 
                conn.Close();
                (map.Layers[SysCommon.TempTableAlias] as FeatureLayer).Modifiers.Clear();
                MapInfo.Mapping.FeatureOverrideStyleModifier fsmtemp = new MapInfo.Mapping.FeatureOverrideStyleModifier(null, compositeStyle);
                (map.Layers[SysCommon.TempTableAlias] as FeatureLayer).Modifiers.Append(fsmtemp);

  • 相关阅读:
    【js】字符串反转可实现的几种方式
    【js】深拷贝一文中的几个错误点
    关于js浅拷贝与深拷贝的理解
    chrome内核浏览器插件的使用--Tampermonkey(油猴插件)
    react复习总结(2)--react生命周期和组件通信
    react复习总结(1)--react组件开发基础
    对gulp的理解和使用(一)
    [luogu3391][文艺平衡树]
    [Splay][学习笔记]
    [bzoj1116][POI2008][CLO]
  • 原文地址:https://www.cnblogs.com/googlegis/p/2978843.html
Copyright © 2011-2022 走看看