/// <summary> /// Add wms layer /// </summary> /// <param name="layer"></param> public void AddWMSLayer(WMSConfig layer) { LayerConfig layerConfig = this.readLayerConfigFromFile(); layerConfig.wmslayers.Add(layer); this.saveLayerConfigToFile(layerConfig); }
/// <summary> /// Add wms layer /// </summary> /// <param name="layer"></param> internal void AddWMSLayer(WMSConfig layer) { LayerConfig layerConfig = this.readLayerConfigFromFile(); layer.id = this.GenerateLayerId(layerConfig).ToString(); layerConfig.wmslayers.Add(layer); this.saveLayerConfigToFile(layerConfig); }
/// <summary> /// Update WMS-layer with new config-options. /// </summary> /// <param name="layer"></param> internal void UpdateWMSLayer(WMSConfig layer) { LayerConfig layerConfig = this.readLayerConfigFromFile(); var index = layerConfig.wmslayers.FindIndex(item => item.id == layer.id); if (index != -1) { layerConfig.wmslayers[index] = layer; } this.saveLayerConfigToFile(layerConfig); }
public void Post(WMSConfig config) { try { this.settingsDataContext.AddWMSLayer(config); } catch (System.Exception e) { _log.ErrorFormat("Exception in WMSLayerController.Post", e.Message); throw; } }
public void Put(WMSConfig config) { this.settingsDataContext.UpdateWMSLayer(config); }
public void AddLayer(WMSConfig layer) { this.settingsDataContext.AddWMSLayer(layer); }
public void UpdateLayer(WMSConfig layer) { this.settingsDataContext.UpdateWMSLayer(layer); }
public void Post(WMSConfig config) { this.settingsDataContext.AddWMSLayer(config); }