From ba882dfa8f38c1b0b11ded13bb8f250e875d2756 Mon Sep 17 00:00:00 2001 From: DjBushido Date: Tue, 8 Apr 2014 19:52:04 -0400 Subject: [PATCH] Add a fancy wrapper method to handle the nasty namespacing --- UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java b/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java index 00968d7..6b2372e 100644 --- a/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java +++ b/UNCCScavenger/src/edu/uncc/scavenger/rest/Location.java @@ -39,10 +39,14 @@ public class Location { this.locationLat = locationLat; } - public android.location.Location getAndroidLocation() { + private android.location.Location getAndroidLocation() { android.location.Location mLocation = new android.location.Location("NinerFinderServer"); mLocation.setLatitude(getLocationLat()); mLocation.setLongitude(getLocationLong()); return mLocation; } + + public float bearingTo(Location target) { + return getAndroidLocation().bearingTo(target.getAndroidLocation()); + } }