Is a realtime gps jQuery mobile possible?
Hello!
It is possible to create a jquery GPS for mobile phone, but it may take you some time.
You can use this script for the GPS part:
(function($) {
        $.gps = {
                approximate:function(loc1, loc2, success)
                {
                        x = 69.1 * (loc2.latitude – loc1.latitude);
                        y = 53.0 * (loc2.longitude – loc1.longitude);
Â
                        mi = Math.sqrt(x * x + y * y);
                        success(mi);
                },               Â
                distance:function(loc1, loc2, success)
                {
                        mi = (3963 * 3.1415926 * Math.sqrt(
                                (loc2.latitude–loc1.latitude) *
                                (loc2.latitude–loc1.latitude) +
                                Math.cos(loc2.latitude/57.29578) *
                                Math.cos(loc1.latitude/57.29578) *
                                (loc2.longitude–loc1.longitude) *
                                (loc2.longitude–loc1.longitude)
                        )/180);
Â
                        success(mi);
                },
                /* not 100% sure this works properly, just yet */
                minMaxRadii:function(loc, mi, success)
                {
                        lat_mile = 0.0144839 * mi;
                        lon_mile = (0.0144839 / Math.cos(loc.latitude * 3.1415926 / 180 )) * mi;
Â
                        var range = {
                                max: {
                                        latitude: loc.latitude + lat_mile,
                                        longitude: loc.longitude + lon_mile
                                },
                                min: {
                                        latitude: loc.latitude – lat_mile,
                                        longitude: loc.longitude – lon_mile
                                }
                        }
Â
                        success(range);
                },
                km2mi:function(km){ return km * 0.621371192; },
                mi2km:function(mi){ return mi * 1.609344; }
        }
})(jQuery);
Â
It also depends on what programming language you would like to use and on what kind of phone you want to use it.
Â
After creating the software, you should use something like this: Location Site
Â
To help you get the needed locations.
Â
Good luck!
Â
Â
Â
Â
Â
Â
Â