[Yanel-dev] [Bug 8450] New: Calculate distance between fixed location and geo location of browser
bugzilla at wyona.com
bugzilla at wyona.com
Mon Jul 25 23:52:10 CEST 2011
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=8450
Summary: Calculate distance between fixed location and geo
location of browser
Product: Yanel
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal (C)
Priority: P2
Component: General
AssignedTo: bmessme at student.ethz.ch
ReportedBy: michael.wechner at wyona.org
QAContact: yanel-development at wyona.com
If geo location is enabled in Firefox, then Firefox will add the latitude and
longitude to the request, e.g.
lat=47.3865887&long=8.5184421
Now we want to calculate the distance from this "location of the browser" to
some other location, e.g. the location of a store (Miros City in Zurich).
Some mathematics on how to do this is explained at
http://www.movable-type.co.uk/scripts/latlong.html
which means we should implement this into a utility class/menthod, e.g.
public class GeoUtil {
/**
* @return distance between two locations
*/
public long(Location here, Location there);
}
or rather try to find existing code, e.g.
http://stackoverflow.com/questions/837872/calculate-distance-in-meters-when-you-know-longitude-and-latitude-in-java
which is Apache license based and hence can be re-used inside Yanel.
We can then use this method to calculate the distance to various stores, e.g.
- Migros Zurich
- Migros Geneva
- Migros Basel
and hence determine which store is the closest or rather generate a list
ordered by the distance.
--
Configure bugmail: http://bugzilla.wyona.com/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the Yanel-development
mailing list