Inheritance: SettingsElementLayer, INotifyPropertyChanged
 public RainRadarConfigViewModel(RainRadarLayer layer)
 {
     // Default caption
     Caption = "RainRadar Config";
     _layer = layer;
     IsRefreshing = Layer.IsRefreshing;
     Layer.PropertyChanged += Layer_PropertyChanged;
 }
Beispiel #2
0
        //public string BaseUrl = "http://cool2.sensorlab.tno.nl:8000/BuienRadarService/RainImage/eu/warped/";
        //public string BaseUrl = "http://cool2.sensorlab.tno.nl:8000/BuienRadarService/RainImage/nl/warped/";
        //public string BaseUrl = "http://*****:*****@"Weather/Rain");
            var w = new WebMercator();
            //Buienradar
            var wi = new RainRadarLayer {ID = Name};
            i = new Image {
                IsHitTestVisible = false,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch
            };
            UpdateImage(AppState.TimelineManager.FocusTime);
            var mpa = new MapPoint(tlLat, tlLon);
            var mpb = new MapPoint(brLat, brLon);
          
            mpa = w.FromGeographic(mpa) as MapPoint;
            mpb = w.FromGeographic(mpb) as MapPoint;
            var envelope = new Envelope(mpa, mpb);
            ElementLayer.SetEnvelope(i, envelope);

            wi.Children.Add(i);
            wi.Initialize();
            wi.Visible = true;
            gl.ChildLayers.Add(wi);

            AppState.TimelineManager.TimeChanged += TimelineManager_TimeChanged;

            AppState.CreateCache += AppState_CreateCache;
        }