On 2013/01/29 18:33, Kan-Ru Chen (陳侃如) wrote:
http://people.mozilla.com/~kchen/FakeGeolocationProvider.js
http://people.mozilla.com/~kchen/FakeGeolocationProvider.manifest
Thanks for the reference! As a first step, I have created a geolocation
branch <https://github.com/mykmelez/r2d2b2g/tree/geolocation> and
committed this component (in prosthesis/components/
<https://github.com/mykmelez/r2d2b2g/tree/geolocation/prosthesis/components>)
such that the Simulator registers it and makes it available in the
Simulator process.
It uses hard coded locations so one thing that is clearly missing is to
send locations and speed from the dashboard.
As I understand it, developers have two basic needs for simulating
geolocation:
1. to specify a fixed location, to simulate a user using an app while
staying in one place, or for apps that don't keep track of changes
over time;
2. to specify a location that changes over time, to simulate a user
using an app while moving around, for apps that keep track of
changes over time.
To meet the first need, we should provide an affordance for setting the
provider to a specific location, f.e. the current location or a location
that the developer specifies.
To meet the second need, we should provide an affordance for telling the
provider to wander from whatever location the developer specifies. We
might also want to let the developer specify some additional parameters,
like the speed, direction, and randomness.
We could integrate this into the Dashboard, but I suspect we're better
off integrating it into the Simulator toolbar, where it'll be closer to
the app the developer is testing. That will be particularly valuable
when going back and forth between the app and the affordances to test
the app with multiple locations.
I'll want to noodle on the interface a bit, but I could imagine it being
a toolbar icon that pops up a doorhanger containing form fields for
specifying latitude and longitude (with a checkbox to "use current
location") and additional fields for specifying movement (perhaps in a
second phase of development).
Kan-Ru: do you have time to help implement this interface and the
backend functionality that supports it?
-myk
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps