示例#1
0
        public ZoomSliderControl(BIT.AVL.Silver.Map.Map map)
        {
            _Map = map;
            DefaultStyleKey = typeof(ZoomSliderControl);

            if(HtmlPage.IsEnabled)
            {
                _Thumb = new Thumb();
                _Slider = this;

                // Slider Events
                _Slider.GotFocus += Slider_GotFocus;
                _Slider.LostFocus += Slider_LostFocus;
                _Slider.ValueChanged += ZoomControl_ValueChanged;

                // Map Events
                _Map.Events.MapMouseEnter += Events_MapMouseEnter;
                _Map.Events.MapMouseLeave += Events_MapMouseLeave;
                _Map.Events.MapZoomStarted += Events_MapZoomStarted;
                _Map.Events.MapZoomEnded += Events_MapZoomEnded;
                _Map.Events.MapZoomChanged += Events_MapZoomChanged;
                _Map.Events.MapMouseWheel += Events_MapMouseWheel;
                _Map.Events.MapDoubleClick += Events_MapDoubleClick;
                _Map.Events.MapTileSourceChanged += Events_MapTileSourceChanged;

                SetTileSourceZoomLevels();
                _UpdateSlider = true;
            }
        }
示例#2
0
        public TileSource(BIT.AVL.Silver.Map.Map mapInstance)
            : base(
                   (int)Math.Pow(2, DefaultMaxZoomLevel) * DefaultTileSize,
                   (int)Math.Pow(2, DefaultMaxZoomLevel) * DefaultTileSize,
                   DefaultTileSize,
                   DefaultTileSize,
                    0)
        {
            map = mapInstance;

        }
示例#3
0
 /// <summary>
 /// A Raster Tile Layer for the map
 /// </summary>
 /// <param name="map">Instance of the map in which to create the layer</param>
 public TileLayer(BIT.AVL.Silver.Map.Map map)
 {
     _Map = map;
     _Msi = new MultiScaleImage();
     Children.Add(_Msi);
     _Msi.Loaded += _Msi_Loaded;
     _Msi.LayoutUpdated += (o, e) => CheckViewBounds();
     _Msi.MotionFinished += (o, e) => _Map.Events.ZoomEnded(_Map, new MapEventArgs());
     _LastViewWidth = _Msi.ViewportWidth;
     _Msi.ViewportChanged += _Msi_ViewportChanged;
     Overlays = new ObservableCollection<ITileSource>();
    
     //This null TileSource allows the MSI to size itself correctly and earlier
     _Msi.Source = new TileSource(map);            
 }
示例#4
0
 /// <summary>
 /// MapEvents constructor, will use the specific instance of the map
 /// </summary>
 public MapEvents(BIT.AVL.Silver.Map.Map map)
 {
     _Map = map;
 }
示例#5
0
 public TileSource(BIT.AVL.Silver.Map.Map mapInstance, int imageWidth, int imageHeight, int tileWidth, int tileHeight, int tileOverlap)
     : base(imageWidth, imageHeight, tileWidth, tileHeight, tileOverlap)
 {
     map = mapInstance;
 }