Exemple #1
0
 private void Map_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     currentSize = e.NewSize;
     ScreenContainer.Width = e.NewSize.Width;
     ScreenContainer.Height = e.NewSize.Height;
     if (this.mapResizeThrottler == null)
     {
         this.mapResizeThrottler = new ThrottleTimer(250, delegate
         {
             if (this.isDesignMode)
             {
                 this.zoomTo(this.designViewBounds, true);
             }
             else
             {
                 this.LoadLayersInView(false, this.GetFullViewBounds());
             }
             this.RaiseViewBoundsChanged();
         });
     }
     this.mapResizeThrottler.Invoke();
 }
Exemple #2
0
        /// <summary>${mapping_Map_constructor_None_D}</summary>
        public Map()
        {
            Theme = null;
            Metadata = new Dictionary<string, string>();
            mapResolution = double.NaN;
            maxResolution = double.MaxValue;
            minResolution = double.Epsilon;
            maxScale = double.MaxValue;
            minScale = double.Epsilon;
            origin = Point2D.Empty;
            base.ManipulationMode = ManipulationModes.All;
            previousViewBounds = Rectangle2D.Empty;
            cacheViewBounds = Rectangle2D.Empty;
            zoomThrottleTimer = new ThrottleTimer(200);
            currentSize = new Size(0, 0);
            base.DefaultStyleKey = typeof(Map);

            Layers = new LayerCollection();
            Popup = new Popup();

            base.Loaded += new RoutedEventHandler(Map_Loaded);

        }