zoukankan      html  css  js  c++  java
  • 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);

  • 相关阅读:
    C#特性
    C#继承
    对FileStream的几种属性和方法认识
    C# Parallel用法
    c#发布补丁
    WebApi接收接收日期格式参数时,日期类型(2019-10-08T16:00:00.000Z)后台接收时间少8小时问题
    c# 基于WebApi的快速开发框架FastFramework
    c# webapi结合swagger的使用
    windows服务autofac注入quartz任务
    c# autofac结合WebApi的使用
  • 原文地址:https://www.cnblogs.com/googlegis/p/2978841.html
Copyright © 2011-2022 走看看