Exemple #1
0
        protected string HandledAsXml(int handled, int scale)
        {
            switch (handled)
            {
            case 0:
                if (Time != NOTVALID_TIME)
                {
                    return(XWriteNode("time", Time));
                }
                break;

            case 1:
                if (Bounds.IsValid())
                {
                    return(Bounds.AsXml(scale));
                }
                break;

            default:
                return(null); // keine behandelten Childs mehr
            }
            return("");
        }
Exemple #2
0
 /// <summary>
 /// vereinigt, wenn möglich, die beiden Bereiche
 /// </summary>
 /// <param name="bounds"></param>
 /// <returns></returns>
 public bool Union(GpxBounds bounds)
 {
     if (!IsValid())
     {
         MinLat = bounds.MinLat;
         MaxLat = bounds.MaxLat;
         MinLon = bounds.MinLon;
         MaxLon = bounds.MaxLon;
     }
     else
     {
         if (bounds.IsValid())
         {
             UnionLatLon(ref MinLon, ref MaxLon, bounds.MinLon, bounds.MaxLon, 180);
             UnionLatLon(ref MinLat, ref MaxLat, bounds.MinLat, bounds.MaxLat, 360);
             return(true);
         }
     }
     return(false);
 }