A HVAC office wants to be able to view the location of their Field Techs on a Google Map within QuickBase so that they can dispatch the Tech closest to the customer’s location.
The Tech’s all carry company issued Verizon phones, so would it be possible for the phones to periodically send out a message with their location information to a destination that can be read by QuickBase’s new connected tables?
If the phones can’t do this, is anyone aware of a GPS device that’s stored in the service truck that can send out the location info?
-
208 Points
Posted 3 years ago
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
This demo locates the ten closest White Castle stores to the searcher's present location (your problem is very similar technically):
White Castle ~ Cravers & Sliders
https://haversineconsulting.quickbase.com/db/bi5963543
Just add a new Search and permit your location to be shared, save the record and a list of the ten closest (as the crow flies) White Castle emporiums will be displayed:
White Castle ~ Cravers & Sliders ~ New Search
https://haversineconsulting.quickbase.com/db/bkkxm2a9w?a=nwr
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=485
I created this app so that no matter where I am after hard day of QuickBasing I can find my nearest White Castle.
Notes
(1) There are no approximations involved in the distance calculations. The trig functions are calculated Client-Side using JavaScript because QuickBase does not have trig functions in their formula language. The essential formula for these calculations is the Haversine function which calculates the great circle distance between two points specified by latitude and longitude (yes that is what my business is named after Haversine - a exotic trig function). Here is a technical reference with code I used.
Calculate distance, bearing and more between Latitude/Longitude points
http://www.movable-type.co.uk/scripts/latlong.html
(2) I took a lot of shortcuts and packaged the demo in this fashion specifically to not involve any external services and for other reasons related to being able to maintain a working demo over time. A production implementation would probably have other requirements that could easily be accommodated.
(3) Great Longitude movie:
Longitude FULL MOVİE 2000 UK
https://www.youtube.com/watch?v=LHvt48S9l4w
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
https://haversineconsulting.quickbase.com/db/bkkxm2a9w?a=dr&rid=25
Please note that I only had US based White Castle locations in my database.
- 10 Points
Jim
P.S. I liked the Alice Cooper video better.
-
208 Points
jQuery(document).ready(function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition);
}
var test = $.ajax({url: url,async:false,success: pushResult}).responseText;
return false;
});
function showPosition(position){
var editURL = "";
editURL = "bkkzi23nv";
editURL += "?act=API_EditRecord&key=" + QBU_recid;
editURL += "&_fid_7=" + position.coords.latitude;
editURL += "&_fid_8=" + position.coords.longitude;
$.ajax({url: editURL,async:false});
location.reload(true);
}
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
You need to use a "reverse geocoding" service. Google has one. I geocoded QuickBase's HQ address and put the lat/lon into the reverse geocode service as follows:
150 Cambridge Park Dr, Cambridge, MA 02140, USA
42.3944341,-71.1461022
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=490
JSON Response
http://pastie.org/10713624
-
744 Points
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
-
744 Points
Ⲇanom the ultimate (Dan Diebolt), Champion
-
29,604 Points
If you need specific help feel free to contact me off world using the information in my profile.
- 60 Points
Related Categories
-
Forms
- 3197 Conversations
- 120 Followers
-
Relationships
- 2562 Conversations
- 40 Followers
-
Roles & permissions
- 2228 Conversations
- 21 Followers
-
Tables & fields
- 7094 Conversations
- 161 Followers