Is there any way to have a google map on the QB homepage that I can "click" on and pull up co-ordinates to create a new client & Job site? also have the map display jobs?

  • 1
  • 1
  • Question
  • Updated 1 year ago
  • Answered

Im building QB app for our plumbing company.  We make use of google maps extensively for mapping and finding addresses.  In South Africa, our addressing system does not always point us to the customers house, we therefore use Lat&Long co-ordinates to get our techs from 1 site to the next.  Is there any way that we can incorporate a google maps widget in the home screen with the ability to "click" and action a new client address and Job.  

I know QB already has built in functions to show various jobs (with their status) already, however this relies on the native google maps search engine to pull address location which is not accurate for us.  Some assistance will be appreciated

Photo of Geoffrey

Geoffrey

  • 1,820 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,448 Points 50k badge 2x thumb
I'm not sure if this will help but here is a tip when you want to store a Customer "Address" in the form of lat and long as opposed to a normal street address.

"Another feature that  you can do natively without coding, is to put the latitude in the Street 1 field and the longitude in the Street 2 field. This will populate the location on the Google Map.

Ensure no other data entered and Save"


https://quickbase-community.intuit.com/questions/1333933-i-have-latitude-and-longitude-coordinates-as-decimals-43-72007-71-0363-and-i-would-like-to-display-this-location-on-a-google-map-on-a-quickbase-form#
Photo of Geoffrey

Geoffrey

  • 1,820 Points 1k badge 2x thumb
That actually works very well. So what I have done is:  
1) Put the address details in a multi text box and
2) then put the "location" details in GPS format in line 1&2 as you said.

Is there any way to incorporate a "clickable" google maps layer within QB?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,448 Points 50k badge 2x thumb
I don't know how to do that :).  I did my Reply as a Comment, so maybe some other brainiac will see this post and respond.
Photo of Geoffrey

Geoffrey

  • 1,820 Points 1k badge 2x thumb
Thanks so much for the quick assistance.  hope someone can shed some light
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,904 Points 20k badge 2x thumb
This script will obtain the lat and lon from a click on the map:

google.maps.event.addListener(map, "click", function (e) {
    var latLng = e.latLng;
});
Photo of Geoffrey

Geoffrey

  • 1,820 Points 1k badge 2x thumb
Thanks a lot.  How would I run the script in a Map widget on the homepage?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,904 Points 20k badge 2x thumb
I am at a conference on a tablet so I will have to answer later as I can't type much.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,904 Points 20k badge 2x thumb
I put this example together very quickly:

Click My Map
https://haversineconsulting.quickbase.com/db/bk8fnevfh


SouthAfricaMap.html User Defined Page
https://haversineconsulting.quickbase.com/db/bk8fnevfh?a=dbpage&pagename=SouthAfricaMap.html


View the source of the second link for the code. I am simply displaying the latitude and longitude on a map click but the script could solicit additional input from the user and if desired to create a new record with the given latitude and longitude.

If you need further help please feel free to contact me off-world using the information in my profile.
Photo of Manny Hernandez

Manny Hernandez

  • 258 Points 250 badge 2x thumb
Is it possible to embed that map onto a form and not just on the home page?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,874 Points 20k badge 2x thumb
yes it is possible - everything is possible with script