Beispiel #1
0
 public MapControl()
 {
     InitializeComponent();
     Loaded                  += new RoutedEventHandler(MapControl_Loaded);
     this.SizeChanged        += new SizeChangedEventHandler(MapControl_SizeChanged);
     MouseMove               += new MouseEventHandler(MapControl_MouseMove);
     MarkerSymbol.mapControl  = this;
     cstInsideRequestIdentify = "mapcontrol_" + Guid.NewGuid();
     MapToolFactory.Init(this);
 }
Beispiel #2
0
        private void SetMapToolByCurrentType()
        {
            IMapCommand cmd = MapToolFactory.GetMapTool(_currentToolType);

            if (!(cmd is IMapTool))
            {
                return;
            }
            if (_currentMapTool != null)
            {
                (_currentMapTool as IMapToolInternal).Deactive();
            }
            _currentMapTool = cmd as IMapTool;
            if (_currentMapTool == null)
            {
                _currentToolType = enumMapTools.None;
            }
            else
            {
                (_currentMapTool as IMapToolInternal).Active();
            }
        }
Beispiel #3
0
 public IMapCommand FindSystemMapTool(enumMapTools maptooltype)
 {
     return(MapToolFactory.GetMapTool(maptooltype));
 }