コード例 #1
0
ファイル: FeatureInfoTip.xaml.cs プロジェクト: ase-lab/eGrid
        public FeatureInfoTip(TroubleTicket g, TroubleTicketServerLayer ttsl)
        {
            InitializeComponent();
            myFeature = g;
            serverlayer = ttsl;

            // The server provides the severity as a short, while the control saves it as an int. When making the window, we must handle both cases.
            if (myFeature.originalGraphic.Attributes["Severity"] is System.Int16)
            {
                Priority = (short)(myFeature.originalGraphic.Attributes["Severity"]);
            }
            else if (myFeature.originalGraphic.Attributes["Severity"] is System.Int32)
            {
                Priority = (int)(myFeature.originalGraphic.Attributes["Severity"]);
            }

            TT_Num.Text = myFeature.originalGraphic.Attributes["OBJECTID"].ToString();
            TT_DES.Text = myFeature.originalGraphic.Attributes["Description"].ToString();
            TT_LOC.Text = "X: " + ((MapPoint)myFeature.Geometry).X + " Y: " + ((MapPoint)myFeature.Geometry).Y;

            ShowMapButton.Visibility = Visibility.Visible;
        }
コード例 #2
0
ファイル: My Application.xaml.cs プロジェクト: ase-lab/eGrid
        /// <summary>
        /// Initialize eGrid's customized layers, and set visibility for other MapLayerManager layers.
        /// </summary>
        private void onLayerSetup()
        {
            // Create customized layers for eGrid.
            VehicleLayer VL = new VehicleLayer();
            TroubleTicketServerLayer TTSL = new TroubleTicketServerLayer();

            // Customize visible layers for eGrid.
            LayerCollection MapLayers = MapLayersManager.Instance.MapLayers;

            MapLayers["Imagery"].Visible = false;
            //            MapLayers["ShadedRelief"].Visible = false;
            MapLayers["BookmarksLayer"].Visible = false;
        }