コード例 #1
0
 void m_mapContainer_MapViewChange(ZDIMS.Event.IMSMapEvent e)
 {
     if (this.m_mapContainer.TileLayerLength > 0)
     {
         this.slider1.Value = this.m_mapContainer.CurMapLevel;
     }
 }
コード例 #2
0
 /// <summary>
 /// 地图就绪事件
 /// </summary>
 /// <param name="e"></param>
 void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
 {
     if (!DesignerProperties.IsInDesignTool)
     {
         //添加图片填充区域对象
         IMSPictureFillStyle PicFill = new IMSPictureFillStyle();
         //添加对象选择监听事件
         PicFill.ChossedMarkerOverCallBack += new IMSPictureFillStyle.ChossedMarkerHander(callback);
         this.graphicsLayer.AddGraphics(PicFill);//添加对象
         //设置坐标
         PicFill.Points.Add(new Point(8.99919517012924, 29.671057152220655));
         PicFill.Points.Add(new Point(12.99919517012924, 10.671057152220655));
         PicFill.Points.Add(new Point(-40.99919517012924, 12.671057152220655));
         PicFill.Draw();//绘制对象
         //添加预定义多边形对象
         IMSSimpleFillStyle fill = new IMSSimpleFillStyle();
         this.graphicsLayer.AddGraphics(fill);
         fill.ChossedMarkerOverCallBack += callback;//监听选择事件
         //设置坐标
         fill.Points.Add(new Point(10.99919517012924, 29.671057152220655));
         fill.Points.Add(new Point(19.99919517012924, 10.671057152220655));
         fill.Points.Add(new Point(33.99919517012924, 32.671057152220655));
         fill.Draw();
     }
 }
コード例 #3
0
        void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
        {
            if (!DesignerProperties.IsInDesignTool)
            {
                //添加线样式对象
                IMSPredefinedLineStyle lines;
                lines = new IMSPredefinedLineStyle();
                this.graphicsLayer.AddGraphics(lines);
                //添加对象选择监听事件
                lines.ChossedMarkerOverCallBack += new IMSPredefinedLineStyle.ChossedMarkerHander(chossedCallBack);
                //设置坐标
                lines.Points.Add(new Point(45.99919517012924, 30.671057152220655));
                lines.Points.Add(new Point(20.99919517012924, 10.671057152220655));
                lines.LineSymbol = LineType.DashDotDot;
                lines.Draw();

                lines = new IMSPredefinedLineStyle();
                lines.StrokeThickness = 5;
                lines.LineSymbol      = LineType.Solid;
                this.graphicsLayer.AddGraphics(lines);
                lines.ChossedMarkerOverCallBack += new IMSPredefinedLineStyle.ChossedMarkerHander(chossedCallBack);
                lines.Points.Add(new Point(4.99919517012924, 29.671057152220655));
                lines.Points.Add(new Point(-10.99919517012924, 3.671057152220655));
                lines.Points.Add(new Point(-40.99919517012924, 35.671057152220655));
                lines.LineSymbol = LineType.DashDotDot;
                lines.Draw();
            }
        }
コード例 #4
0
 void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
 {
     if (!DesignerProperties.IsInDesignTool)
     {
         //初始化自由绘制对象
         this.drawingCtl = new freeDrawing(this.iMSMap1);
     }
 }
コード例 #5
0
        void iMSMap1_MapInitComplete(ZDIMS.Event.IMSMapEvent e)
        {
            //添加地图容器右键菜单
            MenuItem item = new MenuItem();

            item.Header = "取消选择";
            this.iMSMap1.ContextMenu.Items.Add(item);
            item.Click += new RoutedEventHandler(item_Click);
        }
コード例 #6
0
        void iMSMap1_MapInitComplete(ZDIMS.Event.IMSMapEvent e)
        {
            //添加地图容器右键菜单
            MenuItem item = new MenuItem();

            item.Header = "取消选择";
            this.iMSMap1.ContextMenu.Items.Add(item);
            item.Click += new RoutedEventHandler(item_Click);
            this.iMSMap1.SetInfoText("                                                    鼠标选择线编辑,右键菜单“取消选择”!", Colors.Black);
        }
コード例 #7
0
 void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
 {
     initData();  //初始化统计数据序列
     initParam(); //初始化统计点数据
     //实例化统计图控件,并设置其样式
     myChartCtrl1 = new myChartCtrl();
     myChartCtrl1.HorizontalAlignment = HorizontalAlignment.Right;
     myChartCtrl1.VerticalAlignment   = VerticalAlignment.Top;
     myChartCtrl1.SetValue(MarginProperty, new Thickness(0, 200, 50, 0));
     myChartCtrl1.Show();
 }
コード例 #8
0
 /// <summary>
 /// 地图准备完毕处理事件
 /// </summary>
 /// <param name="e"></param>
 void iMSMap1_MapInitComplete(ZDIMS.Event.IMSMapEvent e)
 {
     if (!DesignerProperties.IsInDesignTool)
     {
         //菜单项添加到地图容器的右键菜单
         MenuItem item = new MenuItem();
         item.Header = "取消选择";
         this.iMSMap1.ContextMenu.Items.Add(item);
         item.Click += new RoutedEventHandler(item_Click);
     }
 }
コード例 #9
0
 void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
 {
     if (!DesignerProperties.IsInDesignTool)
     {
         iMSCatalog1.ActiveMapDoc = vectorMapDoc1;
         iMSCatalog1.OnlyVecFlag  = 1;
         iMSCatalog1.MapContainer = iMSMapCatag;
         Canvas.SetZIndex(cwin, 2000);
         Canvas.SetZIndex(img, 2001);
         cwin.Margin     = new Thickness(20, 40, 0, 0);
         cwin.Visibility = System.Windows.Visibility.Collapsed;
     }
 }
コード例 #10
0
        /// <summary>
        /// 地图就绪事件
        /// </summary>
        /// <param name="e"></param>
        void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
        {
            if (!DesignerProperties.IsInDesignTool)
            {
                //监听地图容器鼠标左键弹起事件
                this.iMSMap1.MouseLeftButtonUp += new MouseButtonEventHandler(iMSMap1_MouseLeftButtonUp);
                this.iMSMap1.SetInfoText("                                                    鼠标选择点编辑,点击地图取消选择!", Colors.Black);
                //定义点样式对象,添加到地图上
                IMSSimpleMarkerSymbol markers;
                markers = new IMSSimpleMarkerSymbol();
                //添加预定义点样式对象选择监听事件
                markers.ChossedMarkerOverCallBack += new IMSMarkerSymbol.ChossedMarkerHander(markers_ChossedShapeOverCallBack);
                IMSMark mark;
                mark   = new IMSMark(markers.control, ZDIMS.Interface.CoordinateType.Logic);
                mark.X = 6.99919517012924;
                mark.Y = 30.671057152220655;
                mark.EnableAnimation = false;
                this.markLayer.AddMark(mark);

                markers = new IMSSimpleMarkerSymbol();
                markers.ChossedMarkerOverCallBack += markers_ChossedShapeOverCallBack;
                markers.SymbolStyle = MarkSymbolStyle.Star;
                mark = new IMSMark(markers.control, ZDIMS.Interface.CoordinateType.Logic);
                mark.EnableAnimation = false;
                mark.X = 8.89919517012924;
                mark.Y = 23.971057152220655;
                this.markLayer.AddMark(mark);

                //添加图片点样式对象
                IMSPictureMarkerSymbol picMarker;
                picMarker = new IMSPictureMarkerSymbol();
                //添加对象选择监听事件
                picMarker.ChossedMarkerOverCallBack += markers_ChossedShapeOverCallBack;
                mark   = new IMSMark(picMarker.control, ZDIMS.Interface.CoordinateType.Logic);
                mark.X = 18.99919517012924;
                mark.Y = 30.671057152220655;
                mark.EnableAnimation = false;
                this.markLayer.AddMark(mark);

                picMarker        = new IMSPictureMarkerSymbol();
                picMarker.Source = "../images/Ring.png";//设置图片路径
                //添加对象选择监听事件
                picMarker.ChossedMarkerOverCallBack += markers_ChossedShapeOverCallBack;
                mark   = new IMSMark(picMarker.control, ZDIMS.Interface.CoordinateType.Logic);
                mark.X = 20.99919517012924;
                mark.Y = 23.671057152220655;
                mark.EnableAnimation = false;
                this.markLayer.AddMark(mark);
            }
        }
コード例 #11
0
 void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
 {
     this.bar.MapContainer = this.iMSMap1;
     //if (graphicsLayer1 == null)
     //{
     //    graphicsLayer1 = new GraphicsLayer();
     //    this.iMSMap1.AddChild(graphicsLayer1);
     //}
     this.toolBar1.mapContainer  = this.iMSMap1;
     this.toolBar1.markLayer     = this.markLayer1;
     this.toolBar1.graphicsLayer = this.graphicsLayer1;
     //setstopsData();
     //this.toolBar1.vecObj = this.vectorMapDoc1;
     this.iMSMap1.SetCenter(12730635.074890137, 3577921.7222900391);
 }
コード例 #12
0
        void m_mapContainer_MapViewChange(ZDIMS.Event.IMSMapEvent e)
        {
            double l = this.m_mapContainer.GetBuffer(100) * 100000;

            if (l > 1000)
            {
                l     = l / 1000;
                Lable = "千米";
            }
            else
            {
                Lable = "米";
            }
            string len = Math.Round(l).ToString();

            this.length.Content = len + Lable;
        }
コード例 #13
0
 void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
 {
     Canvas.SetZIndex(imgwin, 180);
     Canvas.SetZIndex(img, 200);
     Canvas.SetZIndex(imgContainer, Canvas.GetZIndex(iMSMap1) + 12);
 }
コード例 #14
0
 void MapContainer_MapViewChange(ZDIMS.Event.IMSMapEvent e)
 {
     RefreshImage();
 }
コード例 #15
0
 void MapContainer_MapOperTypeBeforeChange(ZDIMS.Event.IMSMapEvent e)
 {
     this.MapContainer_MouseLeftButtonDown(null, null);
 }
コード例 #16
0
 void iMSMap1_MapReady(ZDIMS.Event.IMSMapEvent e)
 {
     initData();//统计数据初始化
 }