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); } }
/*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; }
protected override void OnDeactivated() { GpsMap.Clear(); }
public void SetGpsMap(GpsMap gm) { this.gpsMap = gm; }