Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
 public void Post(WMSConfig config)
 {
     try
     {
         this.settingsDataContext.AddWMSLayer(config);
     }
     catch (System.Exception e)
     {
         _log.ErrorFormat("Exception in WMSLayerController.Post", e.Message);
         throw;
     }
 }
Esempio n. 5
0
 public void Put(WMSConfig config)
 {
     this.settingsDataContext.UpdateWMSLayer(config);
 }
Esempio n. 6
0
 public void AddLayer(WMSConfig layer)
 {
     this.settingsDataContext.AddWMSLayer(layer);
 }
Esempio n. 7
0
 public void UpdateLayer(WMSConfig layer)
 {
     this.settingsDataContext.UpdateWMSLayer(layer);
 }
 public void Post(WMSConfig config)
 {
     this.settingsDataContext.AddWMSLayer(config);
 }