예제 #1
0
        private void RemoveIsolinesLayer(VisualizationDataSource removedDataSource)
        {
            IsolinesLayer layer = layers.Find(il => il.Guid == removedDataSource.Guid);

            if (layer != null)
            {
                RemoveLayerFromHost(layer);
                layers.Remove(layer);
            }
        }
예제 #2
0
 private void RemoveLayerFromHost(IsolinesLayer layer)
 {
     if (layer.IsVisible)
     {
         foreach (PolylineGeometry geometry in layer.Geometry)
         {
             host.Geometry.RemoveGeometry(geometry.LayerId, geometry.Id);
         }
         foreach (VisualPushpin pushpin in layer.Labels)
         {
             host.Geometry.RemoveGeometry(pushpin.Pushpin.LayerId, pushpin.Pushpin.Id);
         }
     }
 }
예제 #3
0
 private void AddLayerToHost(IsolinesLayer layer)
 {
     if (layer.IsVisible)
     {
         foreach (PolylineGeometry geometry in layer.Geometry)
         {
             host.Geometry.AddGeometry(geometry);
         }
         foreach (VisualPushpin pushpin in layer.Labels)
         {
             host.Geometry.AddGeometry(pushpin.Pushpin);
         }
     }
 }
예제 #4
0
		private void RemoveLayerFromHost(IsolinesLayer layer)
		{
			if (layer.IsVisible)
			{
				foreach (PolylineGeometry geometry in layer.Geometry)
				{
					host.Geometry.RemoveGeometry(geometry.LayerId, geometry.Id);
				}
				foreach (VisualPushpin pushpin in layer.Labels)
				{
					host.Geometry.RemoveGeometry(pushpin.Pushpin.LayerId, pushpin.Pushpin.Id);
				}
			}
		}
예제 #5
0
		private void AddLayerToHost(IsolinesLayer layer)
		{
			if (layer.IsVisible)
			{
				foreach (PolylineGeometry geometry in layer.Geometry)
				{
					host.Geometry.AddGeometry(geometry);
				}
				foreach (VisualPushpin pushpin in layer.Labels)
				{
					host.Geometry.AddGeometry(pushpin.Pushpin);
				}
			}
		}