Kan-Ru Chen (陳侃如) schrieb:
The code is here
http://people.mozilla.com/~kchen/FakeGeolocationProvider.js
http://people.mozilla.com/~kchen/FakeGeolocationProvider.manifest
It uses hard coded locations so one thing that is clearly missing is to
send locations and speed from the dashboard.
In a very crude geofake implementation one I did for debugging my Lantea
Maps app, I'm just randomizing a position change - this isn't giving
very useful GPS tracks, but helpful enough so I can see if my app paints
tracks and how it does there.
I'm just pointing to either that geofake object or navigator.geolocation
based on a debug mode variable, and it only implements what I need, so
it's crude indeed, but you can see it here:
https://github.com/KaiRo-at/lantea/blob/master/js/map.js#L532
Maybe you like the idea of adding randomized offsets like this, the code
is PL2 so feel free to take the idea - or not. ;-)
Robert Kaiser
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps