User Tools

Site Tools


source_code_wpfdesktopeditionsample_noaaglobelweatherstationlayer.zip

Source Code WpfDesktopEditionSample NOAAGlobelWeatherStationLayer.zip

App.xaml.cs

 using System;  
 using System.Windows;  
 
 namespace NOAAGlobelWeatherStationLayer  
 {  
     /// <summary>  
     /// Interaction logic for App.xaml  
     /// </summary>  
     public partial class App : Application  
     {  
     }  
 }  
 

MainWindow.xaml.cs

 using System;  
 using System.Windows;  
 using ThinkGeo.MapSuite.Core;  
 using ThinkGeo.MapSuite.WpfDesktopEdition;  
 
 namespace NOAAGlobelWeatherStationLayer  
 {  
     /// <summary>  
     /// Interaction logic for MainWindow.xaml  
     /// </summary>  
     public partial class MainWindow : Window  
     {  
         public MainWindow()  
         {  
             InitializeComponent();  
         }  
 
         private void Window_Loaded(object sender, RoutedEventArgs e)  
         {  
             map.MapUnit = GeographyUnit.DecimalDegree;  
             map.Overlays.Add("WorldMapKit", new WorldMapKitWmsWpfOverlay());  
 
             //Add LayerOverlay to map.  
             LayerOverlay noaaWeatherStationOverlay = new LayerOverlay();  
             map.Overlays.Add(noaaWeatherStationOverlay);  
 
             //Add NoaaWeatherStationFeatureLayer to LayerOverlay.  
             NoaaWeatherStationFeatureLayer noaaWeatherStationFeatureLayer = new NoaaWeatherStationFeatureLayer();  
             noaaWeatherStationFeatureLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(new NoaaWeatherStationStyle());  
             noaaWeatherStationFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;  
             noaaWeatherStationOverlay.Layers.Add(noaaWeatherStationFeatureLayer);  
 
             //move map to usa.  
             map.CurrentExtent = new RectangleShape(-130.5615234375, 63.193359375, -44.0771484375, 11.337890625);  
             map.Refresh();  
         }  
     }  
 }  
 
source_code_wpfdesktopeditionsample_noaaglobelweatherstationlayer.zip.txt · Last modified: 2015/09/09 03:38 by admin