Exemplo n.º 1
0
        public DetailsMapViewModel(Map map)
        {
            if (map != null)
            {
                Id                 = map.Id;
                Name               = map.Name;
                SetPublic          = new PublicMapViewModel(map);
                Layers             = new List <DetailsLayerViewModel>();
                DropdownLayerItems = new List <DropdownItemLayerViewModel>();

                if (map.Layers != null)
                {
                    foreach (var layer in map.Layers)
                    {
                        Layers.Add(new DetailsLayerViewModel(layer));
                        DropdownLayerItems.Add(new DropdownItemLayerViewModel(layer));
                    }
                }
            }
        }
Exemplo n.º 2
0
 public DetailsMapViewModel()
 {
     Layers             = new List <DetailsLayerViewModel>();
     DropdownLayerItems = new List <DropdownItemLayerViewModel>();
     SetPublic          = new PublicMapViewModel();
 }