Пример #1
0
        public void SetViewMode(enumDisplayMode mode,string site_id)
        {
            if (mode == enumDisplayMode.GLOBAL_VIEW)
            {
                Load_Site(site_id);
                this.btmGoback.Visibility = System.Windows.Visibility.Collapsed;
                (this.map1.Layers["siteLyr"] as Layer).Visible = true;

                SetCCTVGridExpand(false, System.Windows.Visibility.Collapsed);
                this.largeCCTV.DisMiss();
                this.largeCCTVPanel.Visibility = Visibility.Collapsed;
             //   this.largeCCTVPanel.Opacity = 0;
            }
            else
            {
                this.btmGoback.Visibility = System.Windows.Visibility.Visible;
                vwSiteDegree site= (from n in siteCollection where n.SITE_ID==site_id  select n).FirstOrDefault();
                if (site == null)
                    return;

                loadSiteSensor(site );
                loadSiteCCTV(site);
                (this.map1.Layers["siteLyr"] as Layer).Visible = false;
                ZoomToLevel(SITE_VIEW_LEVEL, ConvertMapPointTo102100(new MapPoint((double)site.X, (double)site.Y)));
                this.map1.ExtentChanged+=new EventHandler<ExtentEventArgs>(map1_CustomExtentChanged);

               // this.largeCCTVPanel.Opacity = 0;
              //  this.largeCCTV.Visibility = System.Windows.Visibility.Visible;
             //   this.largeCCTV.DataContext = null;
            }

            view_mode = mode;
        }
Пример #2
0
        void DisplayGlobalAndBindingSite( )
        {
            ESRI.ArcGIS.Client.ElementLayer lyr = this.map1.Layers["siteLyr"] as ESRI.ArcGIS.Client.ElementLayer;
            dictPins.Clear();
            foreach (vwSiteDegree site in siteCollection)
            {

                Pin pin = new Pin();

                MapPoint mp = new MapPoint() { X = (double)site.X, Y = (double)site.Y };

                pin.SetValue(ESRI.ArcGIS.Client.ElementLayer.EnvelopeProperty,
                     ConvertPointToEnvelop(mp ));

                pin.DataContext = site;

                lyr.Children.Add(pin);
                dictPins.Add(site.SITE_ID, pin);
            }
            view_mode = enumDisplayMode.GLOBAL_VIEW;
            this.map1.Extent = new Envelope(13361742, 2595102, 13692221, 2906181);
        }