Exemplo n.º 1
0
        public void LookupMarker()
        {
            //...
            try
            {
                Coordinate coordinate = Gps.Locate(Location);

                GpsMap.Add(new GpsData
                {
                    Latitude    = coordinate.Latidude,
                    Longitude   = coordinate.Longitude,
                    Description = Location
                });

                BusinessApplication.Instance.ShowPopup(string.Format("Placed marker for {0}", Location));
                Location = null;
            }
            catch (InvalidOperationException ex)
            {
                BusinessApplication.Instance.ShowPopup(ex.Message);
            }
        }
Exemplo n.º 2
0
        /*private Rect TestBackgroundRange()
         * {
         *  float minX = TypeAndParameter.MAX_COORDINATE, minY = TypeAndParameter.MAX_COORDINATE;
         *  float maxX = TypeAndParameter.MIN_COORDINATE, maxY = TypeAndParameter.MIN_COORDINATE;
         *
         *  foreach (Transform child in transform)
         *  {
         *      string name = child.gameObject.name;
         *      Vector3 min = child.gameObject.GetComponent<Renderer>().bounds.min;
         *      Vector3 max = child.gameObject.GetComponent<Renderer>().bounds.max;
         *      XxdwDebugger.Log(name + " @ (" + min.x + "," + min.y + "),(" + max.x + "," + max.y + ")");
         *      if (min.x < minX) minX = min.x;
         *      if (min.y < minY) minY = min.y;
         *      if (max.x > maxX) maxX = max.x;
         *      if (max.y > maxY) maxY = max.y;
         *  }
         *
         *  Rect rect = new Rect(minX, minY, maxX - minX, maxY - minY);
         *  XxdwDebugger.Log("bg bounds: (" + rect.min.x + "," + rect.min.y + "),(" +
         *            rect.max.x + "," + rect.max.y + ")");
         *  return rect;
         * }*/

        public void OnNotiMapSwitched(Notification noti)
        {
            XxdwDebugger.Log("BackgroundController -> OnNotiMapSwitched()");
            this.gpsMap = (GpsMap)noti.Data;
        }
Exemplo n.º 3
0
 protected override void OnDeactivated()
 {
     GpsMap.Clear();
 }
Exemplo n.º 4
0
 public void SetGpsMap(GpsMap gm)
 {
     this.gpsMap = gm;
 }