private void InitializeLayersAndGroups(bool suppressErrors) { this.Layers.Clear(); this.Groups.Clear(); var groups = _impl.GetLayerGroups(); var layers = _impl.GetLayers(); //Groups first for (int i = 0; i < groups.GetCount(); i++) { this.Groups.Add(new LocalRuntimeMapGroup(this, groups.GetItem(i))); } //Then layers for (int i = 0; i < layers.GetCount(); i++) { this.Layers.Add(new LocalRuntimeMapLayer(this, layers.GetItem(i), _conn, suppressErrors)); } }
public void Init(MgResourceIdentifier mapResId) { _map = new MgdMap(mapResId); var groups = _map.GetLayerGroups(); if (groups != null && groups.GetCount() > 0) { for (int i = 0; i < groups.GetCount(); i++) { var grp = groups.GetItem(i); if (grp.LayerGroupType == MgLayerGroupType.BaseMap) { MessageBox.Show(Strings.TiledLayerSupportWarning); break; } } } var fact = new MgdServiceFactory(); viewer.Init(new MgDesktopMapViewerProvider(_map)); viewer.RefreshMap(); }
public void Init(MgResourceIdentifier mapResId) { _map = new MgdMap(mapResId); var groups = _map.GetLayerGroups(); if (groups != null && groups.GetCount() > 0) { for (int i = 0; i < groups.GetCount(); i++) { var grp = groups.GetItem(i); if (grp.LayerGroupType == MgLayerGroupType.BaseMap) { MessageBox.Show(Strings.TiledLayerSupportWarning); break; } } } var fact = new MgdServiceFactory(); viewer.Init(new MgDesktopMapViewerProvider(_map)); viewer.RefreshMap(); }