void TheMap_MouseDoubleClick(object sender, MapMouseEventArgs e)
    {
      Pushpin p = new Pushpin();
      Location loc;
      if (TheMap.TryViewportPointToLocation(e.ViewportPoint, out loc))
      {
        
      }
      p.Location = loc;
      var ts = new HydroNumerics.Time.Web.TimeSeriesService.GeoXYPointTime();

      var val = new HydroNumerics.Time.Web.TimeSeriesService.TimestampValue();
      val.Time = DateTime.Now;
      val.Value = 0;
      ts.items = new System.Collections.ObjectModel.ObservableCollection<HydroNumerics.Time.Web.TimeSeriesService.TimestampValue>();
      ts.items.Add(val);

      p.Tag = ts;

      TheMap.Children.Add(p);
      TheMap.MouseDoubleClick -= TheMap_MouseDoubleClick;
      p_MouseLeftButtonUp(p, null);
    }
        void TheMap_MouseDoubleClick(object sender, MapMouseEventArgs e)
        {
            Pushpin  p = new Pushpin();
            Location loc;

            if (TheMap.TryViewportPointToLocation(e.ViewportPoint, out loc))
            {
            }
            p.Location = loc;
            var ts = new HydroNumerics.Time.Web.TimeSeriesService.GeoXYPointTime();

            var val = new HydroNumerics.Time.Web.TimeSeriesService.TimestampValue();

            val.Time  = DateTime.Now;
            val.Value = 0;
            ts.items  = new System.Collections.ObjectModel.ObservableCollection <HydroNumerics.Time.Web.TimeSeriesService.TimestampValue>();
            ts.items.Add(val);

            p.Tag = ts;

            TheMap.Children.Add(p);
            TheMap.MouseDoubleClick -= TheMap_MouseDoubleClick;
            p_MouseLeftButtonUp(p, null);
        }