zoukankan      html  css  js  c++  java
  • MapXtreme2004代码 之 自定义范围主题地图

    MapXtreme2004代码 之 自定义范围主题地图
    private void showTheme(string temp,bool flag)
    {
        FeatureLayer lyrPnt=MapControl1.Map.Layers[_findLayerName] as FeatureLayer;
        lyrPnt.Modifiers.Clear();
        RangedTheme thm = new RangedTheme(lyrPnt,temp,"ph",4,DistributionMethod.CustomRanges);

        //自定义
        double x,y;
        x=thm.NumericMin;
        y=thm.NumericMax;
        lyrPnt.Modifiers.Insert(0,thm);
        if(flag==true)
        {
            //获取设置的最大最小值
            if(TextBox1.Text!="")
                 x=double.Parse(TextBox1.Text);
            if(TextBox2.Text!="")
                 y=double.Parse(TextBox2.Text);
        }
        thm.Bins[0].Min = x;
        thm.Bins[0].Max = x+(y-x)/4;
        thm.Bins[1].Min = x+(y-x)/4;
        thm.Bins[1].Max = x+(y-x)/2;
        thm.Bins[2].Min = x+(y-x)/2;
        thm.Bins[2].Max = x+3*(y-x)/4;
        thm.Bins[3].Min = x+3*(y-x)/4;
        thm.Bins[3].Max = y;
        thm.RecomputeBins();
        //平均
        ThemeLegendFrame frame = LegendFrameFactory.CreateThemeLegendFrame(temp,"pp",thm);
        MapControl1.Map.Legends.Clear();
        Legend legend = MapControl1.Map.Legends.CreateLegend(new Size(5,5));
        legend.Frames.Append(frame);
        MapControl1.Map.Adornments.Append(legend);
        //MapControl1上显示Legend图例
        TextBox1.Text=x.ToString();
        TextBox2.Text=y.ToString();
    }
    此方法函数可以获取两个TextBox中的数值,然后显示两个数值范围之间的主题地图.当flag为flase时候,为默认生成的主题地图,当flag为true时候,为自定义范围的主题地图.

  • 相关阅读:
    tf_upgrade_v2.exe实验
    tf.random_uniform出错tensorflow2.0出错
    Tensorflow2.0变化
    Anaconda安装PyTorch
    Anaconda是如何进行版本管理的?
    CUDA开发指南
    Tensorflow视频教程&Pytorch视频教程
    Applied Spatiotemporal Data Mining应用时空数据挖掘
    GAN one-shot
    基于深度学习的图像超分辨率重建 一种基于非负矩阵分解的高光谱影像模拟方法
  • 原文地址:https://www.cnblogs.com/googlegis/p/2978969.html
Copyright © 2011-2022 走看看