예제 #1
0
        /// <summary>
        /// 显示地标气泡
        /// </summary>
        /// <param name="markName"></param>
        public void showFeature(string markName)
        {
            FeatureGE featureGE = GeApp.GetFeatureByName(markName);

            if (featureGE != null)
            {
                try
                {
                    GeApp.ShowDescriptionBalloon(featureGE);
                }
                catch (Exception ee) {
                    Console.WriteLine(ee.StackTrace);
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 显示图层
        /// </summary>
        /// <param name="overLayName">图层名称</param>
        public void hiddenOverlay(string overLayName)
        {
            FeatureGE featureGE = GeApp.GetFeatureByName(overLayName);

            if (featureGE != null)
            {
                try
                {
                    featureGE.Visibility = 0;
                }
                catch (Exception ee)
                {
                    LogUtil.debug("hiddenOverlay error:" + ee.StackTrace);
                }
            }
        }
예제 #3
0
        /// <summary>
        /// 显示图层
        /// </summary>
        /// <param name="overLayName">图层名称</param>
        public void showOverlay(string overLayName)
        {
            FeatureGE featureGE = GeApp.GetFeatureByName(overLayName);

            if (featureGE != null)
            {
                try
                {
                    featureGE.Visibility = 1;
                }
                catch (Exception ee)
                {
                    Console.WriteLine(ee.StackTrace);
                }
            }
        }
예제 #4
0
        /// <summary>
        /// 闪烁flash
        /// </summary>
        /// <param name="markName"></param>
        public void flashPlant(string markName)
        {
            DispatcherTimer dtn = new DispatcherTimer();

            dtn.Interval = TimeSpan.FromMilliseconds(1000);
            dtn.Tick    += new EventHandler(delegate(object sender, EventArgs e)
            {
                if (isStopHotFlash)
                {
                    dtn.Stop();
                    return;
                }

                FeatureGE featureGE_1 = GeApp.GetFeatureByName(markName + "-1");
                FeatureGE featureGE_2 = GeApp.GetFeatureByName(markName + "-2");
                if (featureGE_1 != null && featureGE_2 != null)
                {
                    try
                    {
                        if (featureGE_1.Visibility == 1)
                        {
                            featureGE_2.Visibility = 1;
                            //featureGE_2.Highlight();
                            featureGE_1.Visibility = 0;
                        }
                        else
                        {
                            featureGE_1.Visibility = 1;
                            //featureGE_1.Highlight();
                            featureGE_2.Visibility = 0;
                        }
                    }
                    catch (Exception ee)
                    {
                        LogUtil.debug("flashPlant error:" + ee.StackTrace);
                    }
                }
            });//调用函数
            dtn.Start();
        }