Exemplo n.º 1
0
        public NetworkMap(BackgroundLayerSet backgroundLayerSet)
        {
            InitializeComponent();
            _backgroundLayerSet = backgroundLayerSet;
            _defaultColor       = Mapsui.Styles.Color.Black;
            _nodes      = new Dictionary <Mapsui.Providers.Feature, Node2>();
            _links      = new Dictionary <Mapsui.Providers.Feature, Link>();
            _nodeStyles = new Dictionary <System.Windows.Media.Color, SymbolStyle>();
            _linkStyles = new Dictionary <System.Windows.Media.Color, VectorStyle>();
            Clear();

            _nodeLegend = new Legend()
            {
                VerticalAlignment   = System.Windows.VerticalAlignment.Top,
                HorizontalAlignment = System.Windows.HorizontalAlignment.Left,
                Margin     = new System.Windows.Thickness(5, 5, 0, 0),
                Visibility = System.Windows.Visibility.Collapsed,
            };
            _linkLegend = new Legend()
            {
                VerticalAlignment   = System.Windows.VerticalAlignment.Top,
                HorizontalAlignment = System.Windows.HorizontalAlignment.Left,
                Margin     = new System.Windows.Thickness(5, 5, 0, 0),
                Visibility = System.Windows.Visibility.Collapsed,
            };
            root.Children.Add(_nodeLegend);
            root.Children.Add(_linkLegend);
        }
Exemplo n.º 2
0
 public PipeNetworkView2(BackgroundLayerSet backgroundLayerSet)
 {
     InitializeComponent();
     InitializeNetworkMap(backgroundLayerSet);
     InitializePipeDataGrid(dgPipe);
     InitializeJunctionDataGrid(dgJunction);
     Appearances.DataGrid(dgPipe);
     Appearances.DataGrid(dgJunction);
 }
Exemplo n.º 3
0
 public void SetBackgroundLayers(BackgroundLayerSet backgroundLayerSet)
 {
     _배경.Nodes.Clear();
     _backgroundLayerSet = backgroundLayerSet;
     if (_backgroundLayerSet != null)
     {
         foreach (var item in backgroundLayerSet)
         {
             AddBackgroundLayer(item.Header, item.IsEnabled);
         }
     }
 }
        public override async Task Initialize()
        {
            var backgroundLayerFactory = new BackgroundLayerFactory();

            _backgroundLayer = await backgroundLayerFactory.GetKakaoMap();

            _mapview = new MapView(_backgroundLayer);
            Shell.DockManager.ShowDocument(_mapview, "지도", false);

            _backgroundLayer[0].IsEnabled = true;
            var color = _backgroundLayer[0].IsDark
                                    ? System.Drawing.Color.Snow
                                    : System.Drawing.Color.Black;

            _mapview.SetDefaultColor(color);
            _mapview.Refresh();

            InitializeViews();
        }
Exemplo n.º 5
0
 public MapView(BackgroundLayerSet backgroundLayerSet)
 {
     InitializeComponent();
     _map = new MapControl(backgroundLayerSet);
     elementHost.Child = _map;
 }
Exemplo n.º 6
0
 private void InitializeNetworkMap(BackgroundLayerSet backgroundLayerSet)
 {
     _networkMap       = new NetworkMap(backgroundLayerSet);
     elementHost.Child = _networkMap;
 }
Exemplo n.º 7
0
 public PipeNetworkView(BackgroundLayerSet backgroundLayerSet)
 {
     InitializeComponent();
     _networkMap       = new NetworkMap(backgroundLayerSet);
     elementHost.Child = _networkMap;
 }
Exemplo n.º 8
0
 public MapControl(BackgroundLayerSet backgroundLayerSet) : this()
 {
     _backgroundLayerSet = backgroundLayerSet;
     _defaultColor       = Mapsui.Styles.Color.Black;
     Clear();
 }